diff --git a/src/typing/operators.ml b/src/typing/operators.ml index 90740b56d33..ed932108e6c 100644 --- a/src/typing/operators.ml +++ b/src/typing/operators.ml @@ -237,14 +237,22 @@ let make_binop ctx op e1 e2 is_assign_op with_type p = if unify_int ctx e1 KUnk then tint else tfloat | KUnk , KFloat | KUnk , KString -> - unify ctx e1.etype e2.etype e1.epos; - e1.etype + if Define.defined ctx.com.defines Define.HaxeNext then + e2.etype + else begin + unify ctx e1.etype e2.etype e1.epos; + e1.etype + end | KInt , KUnk -> if unify_int ctx e2 KUnk then tint else tfloat | KFloat , KUnk | KString , KUnk -> - unify ctx e2.etype e1.etype e2.epos; - e2.etype + if Define.defined ctx.com.defines Define.HaxeNext then + e1.etype + else begin + unify ctx e2.etype e1.etype e2.epos; + e2.etype + end | _ , KString | KString , _ -> tstring diff --git a/std/neko/Boot.hx b/std/neko/Boot.hx index 19ff40aa0b4..cd2b1decdbb 100644 --- a/std/neko/Boot.hx +++ b/std/neko/Boot.hx @@ -48,7 +48,11 @@ class Boot { i += 1; } e.__string = old; + #if haxe_next + return NativeString.ofString(s + untyped ")".__s); + #else return s + untyped ")".__s; + #end } private static function __interfLoop(cc:Dynamic, cl:Dynamic) {