Skip to content

Commit

Permalink
Use AssertHelper method to get actual type.
Browse files Browse the repository at this point in the history
  • Loading branch information
manfred-brands committed Aug 10, 2020
1 parent 1499a65 commit b14159e
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,7 @@ protected override void AnalyzeAssertInvocation(SyntaxNodeAnalysisContext contex
if (actualExpression == null || expectedExpression == null)
return;

var actualTypeInfo = semanticModel.GetTypeInfo(actualExpression, cancellationToken);
var actualType = actualTypeInfo.Type ?? actualTypeInfo.ConvertedType;

actualType = AssertHelper.UnwrapActualType(actualType);
var actualType = AssertHelper.GetUnwrappedActualType(actualExpression, semanticModel, cancellationToken);

var expectedType = semanticModel.GetTypeInfo(expectedExpression, cancellationToken).Type;

Expand Down

0 comments on commit b14159e

Please sign in to comment.