Skip to content

Commit

Permalink
Minor change in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
genlu committed May 17, 2017
1 parent 22a15c0 commit ac6e7c9
Showing 1 changed file with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1673,11 +1673,16 @@ public void M2()
}

private class IndexerAccessArgumentVerifier : OperationWalker
{
public static void Verify(IOperation operation)
{
public static readonly IndexerAccessArgumentVerifier Instance = new IndexerAccessArgumentVerifier();

private IndexerAccessArgumentVerifier()
{
var walker = new IndexerAccessArgumentVerifier();
walker.Visit(operation);
}

public static void Verify(IOperation operation)
{
Instance.Visit(operation);
}

public override void VisitIndexedPropertyReferenceExpression(IIndexedPropertyReferenceExpression operation)
Expand All @@ -1693,7 +1698,7 @@ public override void VisitIndexedPropertyReferenceExpression(IIndexedPropertyRef
{
if (!argument.IsInvalid)
{
Assert.True(argument.Parameter.ContainingSymbol == indexerSymbol);
Assert.Same(indexerSymbol, argument.Parameter.ContainingSymbol);
}
}
}
Expand Down

0 comments on commit ac6e7c9

Please sign in to comment.