Browse Source

Add missing ILVariableResolveResult annotations: Fix #874: ILSpy don't highlight variable definition and references at the same time in foreach.

pull/877/head
Siegfried Pammer 8 years ago
parent
commit
470d3a2901
  1. 1
      ICSharpCode.Decompiler/CSharp/StatementBuilder.cs

1
ICSharpCode.Decompiler/CSharp/StatementBuilder.cs

@ -339,6 +339,7 @@ namespace ICSharpCode.Decompiler.CSharp @@ -339,6 +339,7 @@ namespace ICSharpCode.Decompiler.CSharp
InExpression = collectionExpr.Detach(),
EmbeddedStatement = foreachBody
};
foreachStmt.AddAnnotation(new ILVariableResolveResult(itemVariable, itemVariable.Type));
if (optionalReturnAfterLoop != null) {
return new BlockStatement {
Statements = {

Loading…
Cancel
Save