diff options
author | nosami <jasonimison@gmail.com> | 2022-10-23 18:49:32 +0300 |
---|---|---|
committer | nosami <jasonimison@gmail.com> | 2022-10-25 13:44:29 +0300 |
commit | 36c4d5c5f6139c9f09fc21e3d46b6258037ae3d3 (patch) | |
tree | e831ffe15626595f5dfe41be5ac7c27a95a98f19 | |
parent | f5d425fa9bd6bc157d5b356c90fcd8a6024ad0e0 (diff) |
Generic method resolve fix
-rw-r--r-- | Mono.Debugging/Mono.Debugging.Evaluation/NRefactoryExpressionEvaluatorVisitor.cs | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/Mono.Debugging/Mono.Debugging.Evaluation/NRefactoryExpressionEvaluatorVisitor.cs b/Mono.Debugging/Mono.Debugging.Evaluation/NRefactoryExpressionEvaluatorVisitor.cs index 6a64796..fdb3ba1 100644 --- a/Mono.Debugging/Mono.Debugging.Evaluation/NRefactoryExpressionEvaluatorVisitor.cs +++ b/Mono.Debugging/Mono.Debugging.Evaluation/NRefactoryExpressionEvaluatorVisitor.cs @@ -890,7 +890,7 @@ namespace Mono.Debugging.Evaluation typeArgs = null; var fullName = invocationExpression.ToString(); var lastIndexOfDot = fullName.LastIndexOf("."); - return fullName.Substring(lastIndexOfDot + 1); + return fullName.Substring(lastIndexOfDot + 1); } public override ValueReference VisitInvocationExpression (InvocationExpressionSyntax node) @@ -925,7 +925,7 @@ namespace Mono.Debugging.Evaluation if (field.Expression is BaseExpressionSyntax) invokeBaseMethod = true; methodName = ResolveMethodName (field, out typeArgs); - } else if (node.Expression is IdentifierNameSyntax method) { + } else if (node.Expression is SyntaxNode method && (method is IdentifierNameSyntax || method is GenericNameSyntax)) { var vref = ctx.Adapter.GetThisReference (ctx); methodName = ResolveMethodName (method, out typeArgs); @@ -1294,13 +1294,14 @@ namespace Mono.Debugging.Evaluation { object[] typeArgs = new object[node.TypeArgumentList.Arguments.Count]; - for (var i = 0; i < node.TypeArgumentList.Arguments.Count; i++) { - var typeArg = Visit(node.TypeArgumentList.Arguments[i]); - typeArgs[i] = typeArg.Type; - } + for (var i = 0; i < node.TypeArgumentList.Arguments.Count; i++) { + var typeArg = Visit(node.TypeArgumentList.Arguments[i]); + typeArgs[i] = typeArg.Type; + } - string typeName = node.Identifier.ValueText; + string typeName = node.Identifier.ValueText; + var d = ctx.Adapter.GetDisplayTypeName(typeName); var type1 = ctx.Adapter.GetType(ctx, typeName, typeArgs); return new TypeValueReference(ctx, type1); |