projects
/
mono.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Fix #77628.
[mono.git]
/
mcs
/
mcs
/
literal.cs
diff --git
a/mcs/mcs/literal.cs
b/mcs/mcs/literal.cs
index 639e5368c81699ea34af5cfb32eab4d7e8c5ceb3..c7aae9204b0a775c51648643e8ade9d926fb42ca 100644
(file)
--- a/
mcs/mcs/literal.cs
+++ b/
mcs/mcs/literal.cs
@@
-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;
+ }
}
//