int integerValue; string stringValue; int[] intArrayValue; static assert(GenerateWriter!("foo", integerValue, "integerValue") == "public final @property void foo(typeof(integerValue) foo) " ~ "@nogc nothrow pure @safe { this.foo = foo; }"); static assert(GenerateWriter!("foo", stringValue, "stringValue") == "public final @property void foo(typeof(stringValue) foo) " ~ "@nogc nothrow pure @safe { this.foo = foo; }"); static assert(GenerateWriter!("foo", intArrayValue, "intArrayValue") == "public final @property void foo(typeof(intArrayValue) foo) " ~ "nothrow pure @safe { this.foo = foo.dup; }");