+ //
+ // string operator + (string x, object y)
+ //
+ if (lt == InternalType.NullLiteral) {
+ if (rt.BuiltinType == BuiltinTypeSpec.Type.Object)
+ return new StringConstant (ec.BuiltinTypes, "" + right.GetValue (), left.Location);
+
+ if (lt == rt) {
+ ec.Report.Error (34, loc, "Operator `{0}' is ambiguous on operands of type `{1}' and `{2}'",
+ "+", lt.GetSignatureForError (), rt.GetSignatureForError ());
+ return null;
+ }
+
+ return right;
+ }
+
+ //
+ // string operator + (object x, string y)
+ //
+ if (rt == InternalType.NullLiteral) {
+ if (lt.BuiltinType == BuiltinTypeSpec.Type.Object)
+ return new StringConstant (ec.BuiltinTypes, right.GetValue () + "", left.Location);
+
+ return left;
+ }
+