# HG changeset patch # User aziz # Date 1184573824 0 # Node ID a95fee6e4b7e4cf736fc3ce253dc5d7e6608a485 # Parent 88c1777a9e515f409b015138bb39bf5c10b58850 - Fix: parseDeclaration(): appending null to values when no initializer present. diff -r 88c1777a9e51 -r a95fee6e4b7e trunk/src/Parser.d --- a/trunk/src/Parser.d Sun Jul 15 21:35:05 2007 +0000 +++ b/trunk/src/Parser.d Mon Jul 16 08:17:04 2007 +0000 @@ -264,7 +264,7 @@ // It's a variable declaration. string[] idents = [ident]; Expression[] values; - goto LenterLoop; + goto LenterLoop; // We've already parsed an identifier. Jump to if statement and check for initializer. while (token.type == T.Comma) { idents ~= requireIdentifier(); @@ -274,6 +274,8 @@ nT(); values ~= parseInitializer(); } + else + values ~= null; } require(T.Semicolon); return new VariableDeclaration(idents, values);