Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Generators/Microsoft.Gen.Metrics/Parser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@ private bool CheckMethodReturnType(IMethodSymbol methodSymbol)
returnType.TypeKind != TypeKind.Error)
{
// Make sure return type is not from existing known type
Diag(DiagDescriptors.ErrorInvalidMethodReturnType, methodSymbol.ReturnType.GetLocation(), methodSymbol.Name);
Diag(DiagDescriptors.ErrorInvalidMethodReturnType, returnType.GetLocation(), returnType.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat));
return false;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ class CustomClass {{ }}

_ = Assert.Single(d);
Assert.Equal(DiagDescriptors.ErrorInvalidMethodReturnType.Id, d[0].Id);
Assert.Contains($"must not return '{returnType}'", d[0].GetMessage());
}

[Theory]
Expand Down
Loading