Skip to content

Commit

Permalink
Merge pull request #468 from sharwell/fix-464
Browse files Browse the repository at this point in the history
Fix InvalidCastException in PrefixLocalCallsWithThis
  • Loading branch information
sharwell committed Feb 9, 2015
2 parents e67cb76 + 97b2a1f commit f57ad1b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,10 @@ public void InstanceMethodName(int ParameterName)
BaseInstanceFieldName = BaseInstanceFieldName,
BaseInstancePropertyName = BaseInstancePropertyName,
}
// the following line is a regression test for #464
// https://github.com/DotNetAnalyzers/StyleCopAnalyzers/issues/464
var conditional = this?.BaseInstanceFieldName;
}
}
";
Expand Down Expand Up @@ -232,6 +236,10 @@ public void InstanceMethodName(int ParameterName)
BaseInstanceFieldName = this.BaseInstanceFieldName,
BaseInstancePropertyName = this.BaseInstancePropertyName,
}
// the following line is a regression test for #464
// https://github.com/DotNetAnalyzers/StyleCopAnalyzers/issues/464
var conditional = this?.BaseInstanceFieldName;
}
}
";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@ private void HandleIdentifierName(SyntaxNodeAnalysisContext context)

break;

case SyntaxKind.MemberBindingExpression:
// this doesn't need to be handled
return;

default:
break;
}
Expand Down

0 comments on commit f57ad1b

Please sign in to comment.