# HG changeset patch # User Aziz K?ksal # Date 1197934350 -3600 # Node ID bdd49ad84f5f0e57f97d632a97ec3a846bb6d283 # Parent 581b3cf3fe8f69fdebc458f527f806d2ade159a7 Fixed parsing bug in parseVariableOrFunction(). diff -r 581b3cf3fe8f -r bdd49ad84f5f trunk/src/dil/Parser.d --- a/trunk/src/dil/Parser.d Mon Dec 17 22:16:13 2007 +0100 +++ b/trunk/src/dil/Parser.d Tue Dec 18 00:32:30 2007 +0100 @@ -508,9 +508,12 @@ d.setProtection(protection); return set(d, begin); } - // Type VariableName DeclaratorSuffix - ident = requireIdentifier(MSG.ExpectedVariableName); - type = parseDeclaratorSuffix(type); + else + { + // Type VariableName DeclaratorSuffix + ident = requireIdentifier(MSG.ExpectedVariableName); + type = parseDeclaratorSuffix(type); + } } // It's a variable declaration. @@ -3756,8 +3759,8 @@ else params = parseParameterList(); - type = set(new CFuncPointerType(type, params), begin); - return type; + type = new CFuncPointerType(type, params); + return set(type, begin); } Type parseDeclarator(ref Identifier* ident, bool identOptional = false)