Skip to content

Instantly share code, notes, and snippets.

@mkrueger
Created March 30, 2012 18:54
Show Gist options
  • Save mkrueger/2254007 to your computer and use it in GitHub Desktop.
Save mkrueger/2254007 to your computer and use it in GitHub Desktop.
@@ -2647,8 +2647,9 @@
if (!isConst && IsVar(variableDeclarationStatement.Type) && variableDeclarationStatement.Variables.Count == 1) {
VariableInitializer vi = variableDeclarationStatement.Variables.Single();
StoreCurrentState(variableDeclarationStatement.Type);
- IType type = Resolve(vi.Initializer).Type;
- StoreResult(variableDeclarationStatement.Type, new TypeResolveResult(type));
+ var typeResolveResult = Resolve(vi.Initializer);
+ IType type = typeResolveResult.Type;
+ StoreResult(variableDeclarationStatement.Type, typeResolveResult);
IVariable v = MakeVariable(type, vi.NameToken);
resolver = resolver.AddVariable(v);
Scan(vi);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment