Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/debugger-libs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornosami <jasonimison@gmail.com>2022-10-21 15:23:34 +0300
committernosami <jasonimison@gmail.com>2022-10-25 13:44:29 +0300
commita4ef543d0d8eeb8339b3ce22e5598be0f5b740e1 (patch)
tree2b7d3e9b381e909be816319aa2e7aef1143bc152
parentfce9e77926027d93ac8fd09cc37f14700cfbc5c8 (diff)
Fix nullable type tests
-rw-r--r--Mono.Debugging/Mono.Debugging.Evaluation/NRefactoryExpressionEvaluatorVisitor.cs18
1 files changed, 3 insertions, 15 deletions
diff --git a/Mono.Debugging/Mono.Debugging.Evaluation/NRefactoryExpressionEvaluatorVisitor.cs b/Mono.Debugging/Mono.Debugging.Evaluation/NRefactoryExpressionEvaluatorVisitor.cs
index 66e0c71..7470e43 100644
--- a/Mono.Debugging/Mono.Debugging.Evaluation/NRefactoryExpressionEvaluatorVisitor.cs
+++ b/Mono.Debugging/Mono.Debugging.Evaluation/NRefactoryExpressionEvaluatorVisitor.cs
@@ -1272,21 +1272,9 @@ namespace Mono.Debugging.Evaluation
public override ValueReference VisitNullableType (NullableTypeSyntax node)
{
- if (node.ElementType is PredefinedTypeSyntax predefinedTypeSyntax)
- {
- var type = ctx.Adapter.GetType(ctx, GetNullableKind(predefinedTypeSyntax));
- return new TypeValueReference(ctx, type);
- }
- return null; //TODO:
-
- ////if(node.)
- //var value = this.Visit(node.ElementType);
- //string nullableKind;
- //var type1 = ctx.Adapter.GetType(ctx, NRefactoryExtensions.Resolve(node.ElementType.ToString()));
- ////ctx.Adapter.
- //ValueReference nullable = ctx.Adapter.NullableGetValue(ctx, type1, value);
- //return nullable;
- //return this.Visit(node.ElementType);
+ var genericTypeArgument = new[] { ctx.Adapter.GetType(ctx, NRefactoryExtensions.Resolve(node.ElementType.ToString())) };
+ var type1 = ctx.Adapter.GetType(ctx, "System.Nullable`1", genericTypeArgument);
+ return new TypeValueReference(ctx, type1);
}
private string GetNullableKind(PredefinedTypeSyntax type)