[Issue 1351] Discrepancies in the language specification

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Jul 20 14:27:42 PDT 2007


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





------- Comment #3 from aziz.kerim at gmail.com  2007-07-20 16:27 -------
One more thing:

AutoDeclaration:
        StorageClasses Identifier = AssignExpression ; // doesn't allow for
multiple declarations

Currently you can write things like:

auto bla = 2, foo = "abc";

'bla' will be of type int and foo will be of type char[]. Maybe this needs to
be changed because it's inconsistent with the syntax of non-auto declarations:

int bla = 2, foo = "abc"; // error because foo is of type int.

When we have:

auto id1 = init(), id2, id3; // id2 and id3 should be of type typeof(id1).

What do you think about this issue?


-- 



More information about the Digitalmars-d-bugs mailing list