Fix parsing problem with array initialisers
commitc5b298202f780ad716792d7f52842d6e783493ec
authorThomas Leonard <talex5@gmail.com>
Thu, 18 Sep 2008 20:14:16 +0000 (18 21:14 +0100)
committerThomas Leonard <talex5@gmail.com>
Thu, 18 Sep 2008 20:14:16 +0000 (18 21:14 +0100)
tree40450aef9ee3fd205955c142796f1956a902f37e
parent8a46f243a9a871a5bb59c62527c97379343ab6cb
Fix parsing problem with array initialisers

The D parser has to cope with two types of array:

int foo = 10
new byte[foo]

and:

alias char[] foo
new byte[foo]

When it parses the new line, it's not ready to resolve the symbol foo, so it
assumes the second case and then rewrites it later during the semantic pass if
foo turns out to be an expression instead. Turning foo into foo? broke that.
dmd/parse.c