return "null";
}
- public override void Error_ValueCannotBeConverted (Location loc, Type t)
+ public override void Error_ValueCannotBeConverted (Location loc, Type t, bool expl)
{
Report.Error (37, loc, "Cannot convert null to `{0}' because it is a value type",
TypeManager.CSharpName (t));
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;
+ }
}
//