Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dont infer string on concat #11318

Merged
merged 2 commits into from
Nov 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions src/typing/operators.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion std/neko/Boot.hx
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down