diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs b/ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs index 7752d667e..2c13f6f56 100644 --- a/ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs +++ b/ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs @@ -739,7 +739,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax if (type == null) throw new ArgumentNullException("type"); if (constantValue == null) { - if (type.IsReferenceType == true) { + if (type.IsReferenceType == true || type.IsKnownType(KnownTypeCode.NullableOfT)) { var expr = new NullReferenceExpression(); if (AddResolveResultAnnotations) expr.AddAnnotation(new ConstantResolveResult(SpecialType.NullType, null));