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