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

Compiler crash with "string" + int_var #17

Closed
tomxp411 opened this issue Jan 7, 2022 · 1 comment
Closed

Compiler crash with "string" + int_var #17

tomxp411 opened this issue Jan 7, 2022 · 1 comment

Comments

@tomxp411
Copy link

tomxp411 commented Jan 7, 2022

I discovered a way to crash the compiler with the following message:

assertion "0" failed: file "frontend.c", line 726, function: coercion
Program aborted

Attempting to concatenate an integer type to a string will do this every time. For example:
DIM n AS INTEGER
PRINT "HELLO " + n

If I use the type correct "HELLO " + STR$(n), the program seems to work as expected.

The expected result would be either a compiler error (since you can't concatenate strings and numeric types) or an automatic widening conversion (ie: an implicit STR$(n)).

@gooofy
Copy link
Owner

gooofy commented Jan 8, 2022

thanks for the report - should be fixed now

a5e2975

@gooofy gooofy closed this as completed Jan 8, 2022
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

No branches or pull requests

2 participants