forked from dotnet/BenchmarkDotNet
-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
in SmartParameter.ToSourceCode():
string cast = Value == null ? string.Empty : $"({Value.GetType().GetCorrectCSharpTypeName()})"; |
Similar issue was fixed in SmartArgument.ToSourceCode():
string cast = $"({parameterDefinitions[argumentIndex].ParameterType.GetCorrectCSharpTypeName()})"; // it's an object so we need to cast it to the right type |
See PR dotnet#1228
-string cast = $"({Value.GetType().GetCorrectCSharpTypeName()})"; // it's an object so we need to cast it to the right type
+string cast = $"({parameterDefinitions[argumentIndex].ParameterType.GetCorrectCSharpTypeName()})"; // it's an object so we need to cast it to the right type
Would probably fix dotnet#2011
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working