[Issue 1986] Mixin code from website doesn't compile

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Dec 16 08:08:57 PST 2008


http://d.puremagic.com/issues/show_bug.cgi?id=1986


gide at nwawudu.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |diagnostic




------- Comment #3 from gide at nwawudu.com  2008-12-16 10:08 -------
Added keyword diagnostic and simplified example, should error message should
say
"test.d(5): Error: argument to mixin must be a *invariant char[]* not
(*invariant(char)[]*)"?

test.d
------
invariant char[] str1 = "int x1;"; // OK
mixin(str1); // OK

string str2 = "int x2;";
mixin(str2); // Fails, test.d(5): Error: argument to mixin must be a string,
not (str2)


-- 



More information about the Digitalmars-d-bugs mailing list