From b00a82403e68ff7c64f2b51afb661d7260da1955 Mon Sep 17 00:00:00 2001 From: Simon Krajewski Date: Mon, 25 Sep 2023 09:12:03 +0200 Subject: [PATCH 1/2] [typer] don't infer String when concatenating see #11284 --- src/typing/operators.ml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/typing/operators.ml b/src/typing/operators.ml index 3c9d92f035d..94a43d08bec 100644 --- a/src/typing/operators.ml +++ b/src/typing/operators.ml @@ -239,14 +239,12 @@ 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 + e2.etype | 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 + e1.etype | _ , KString | KString , _ -> tstring From e59f9d7559aefa0a7d419b0592da7b07f7e06007 Mon Sep 17 00:00:00 2001 From: Simon Krajewski Date: Mon, 25 Sep 2023 10:23:36 +0200 Subject: [PATCH 2/2] dodge neko things very elegantly --- std/neko/Boot.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/std/neko/Boot.hx b/std/neko/Boot.hx index 19ff40aa0b4..05b8ffa6bd7 100644 --- a/std/neko/Boot.hx +++ b/std/neko/Boot.hx @@ -48,7 +48,7 @@ class Boot { i += 1; } e.__string = old; - return s + untyped ")".__s; + return NativeString.ofString(s + untyped ")".__s); } private static function __interfLoop(cc:Dynamic, cl:Dynamic) {