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

Dont infer string on concat #11318

merged 2 commits into from
Nov 7, 2023

Conversation

Simn
Copy link
Member

@Simn Simn commented Sep 25, 2023

Currently, monomorphs are bound to String when we concat + them to a string. This PR avoids this unification and instead inserts Std.string(mono):

function main() {
	var a = null;
	trace("Value: " + a);
	$type(a); // Null<Unknown<0>> (was Null<String>)
}

This seems much more natural, given that we allow concatenating any type to a string.

Closes #11284, but probably ruins somebody's day.

@Simn Simn added this to the Release 5.0 milestone Sep 25, 2023
@back2dos
Copy link
Member

I like it ;)

@skial skial mentioned this pull request Sep 27, 2023
1 task
@Simn
Copy link
Member Author

Simn commented Nov 7, 2023

This also closes #9585 and makes #9586 obsolete.

@Simn Simn merged commit 46ded5a into development Nov 7, 2023
122 checks passed
@Simn Simn deleted the dont_infer_string_on_concat branch November 7, 2023 13:27
0b1kn00b pushed a commit to 0b1kn00b/haxe that referenced this pull request Jan 25, 2024
* [typer] don't infer String when concatenating

see HaxeFoundation#11284

* dodge neko things very elegantly
back2dos added a commit to haxetink/tink_csss that referenced this pull request Jan 29, 2024
@kLabz kLabz mentioned this pull request Feb 18, 2024
19 tasks
kLabz pushed a commit that referenced this pull request Feb 18, 2024
* [typer] don't infer String when concatenating

see #11284

* dodge neko things very elegantly
kLabz pushed a commit that referenced this pull request Feb 18, 2024
* [typer] don't infer String when concatenating

see #11284

* dodge neko things very elegantly
kLabz pushed a commit that referenced this pull request Mar 4, 2024
* [typer] don't infer String when concatenating

see #11284

* dodge neko things very elegantly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Hashlink] Wrong JSON array parsing
2 participants