Fix #77628.
[mono.git] / mcs / mcs / literal.cs
index 639e5368c81699ea34af5cfb32eab4d7e8c5ceb3..c7aae9204b0a775c51648643e8ade9d926fb42ca 100644 (file)
@@ -114,6 +114,13 @@ namespace Mono.CSharp {
                        return base.ToType (type, loc);
                }
 
+               public override Constant Reduce(EmitContext ec, Type target_type)
+               {
+                       if (!TypeManager.IsValueType (target_type))
+                               return new NullCast (this, target_type);
+
+                       return null;
+               }
        }
 
        //