-
-
Notifications
You must be signed in to change notification settings - Fork 661
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
Crash on ambiguous string interpolation expression #11402
Comments
Nice one! Can be reduced quite a bit: class Main {
static function test() {
var ans = Std.string(return "") + "";
}
static function main() {
test();
}
} The analyzer doesn't deal with the unreachable block in value binops correctly. I'm not sure why the original code should be an error though. |
Can repro on 4.3.x too |
Yeah, I already added the commit to #11394. |
0b1kn00b
pushed a commit
to 0b1kn00b/haxe
that referenced
this issue
Jan 25, 2024
kLabz
pushed a commit
that referenced
this issue
Feb 18, 2024
kLabz
pushed a commit
that referenced
this issue
Mar 4, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The following code crashes the compiler when run with "haxe -x Bug_2023Nov21.hx" (Tested on Haxe 4.3.3/unix and 4.3.1/unix):
File "src/optimization/analyzerTexprTransformer.ml", line 123, characters 18-25 Called from file "src/optimization/analyzerTexprTransformer.ml", line 123, characters 11-25 Called from file "src/optimization/analyzerTexprTransformer.ml", line 184, characters 13-24 Called from file "src/optimization/analyzerTexprTransformer.ml", line 285, characters 15-25 Called from file "src/optimization/analyzerTexprTransformer.ml", line 245, characters 11-47 Called from file "src/optimization/analyzerTexprTransformer.ml", line 208, characters 38-55 Called from file "list.ml", line 121, characters 24-34 Called from file "src/optimization/analyzerTexprTransformer.ml", line 204, characters 18-238 Called from file "src/optimization/analyzerTexprTransformer.ml", line 121, characters 24-53 Called from file "src/optimization/analyzerTexprTransformer.ml", line 184, characters 13-24 Called from file "src/optimization/analyzerTexprTransformer.ml", line 364, characters 16-27 Called from file "src/optimization/analyzerTexprTransformer.ml", line 632, characters 14-32 Called from file "src/optimization/analyzerTexprTransformer.ml", line 660, characters 15-39 Called from file "src/optimization/analyzerTexprTransformer.ml", line 668, characters 23-47 Called from file "src/optimization/analyzer.ml", line 951, characters 10-13 Called from file "src/optimization/analyzer.ml", line 995, characters 2-106 Called from file "src/optimization/analyzer.ml", line 1059, characters 25-37 Called from file "src/optimization/analyzer.ml", line 1097, characters 4-22 Called from file "src/optimization/analyzer.ml", line 1112, characters 2-30 Called from file "list.ml", line 110, characters 12-15 Called from file "src/optimization/analyzer.ml", line 1122, characters 2-53 File "src/core/globals.ml", line 156, characters 1-7: Assertion failed
The string interpolation is generally considered an error by the compiler(and there are plenty of ways to rewrite it in a way the compiler agrees with), but this one fails in different ways when I move it around to slightly different contexts.
The text was updated successfully, but these errors were encountered: