The implementation of the Rascal meta-programming language (including interpreter, type checker, parser generator, compiler and JVM based run-time system)
Add-assigning two sets with elements of incompatible types does not raise a static error, but crashes during interpretation.
To Reproduce
set[int] s1 = {0};
set[str] s2 = {"foo"};
s1 += s2; // No static error, but `UnexpectedType` exception from interpreter
s1 = s2; // Static error: Cannot assign righthand side of type `set[str]` to lefthand side of type `set[int]`
Expected behavior
A static error from the type checker, like the one for assignment
Describe the bug
Add-assigning two sets with elements of incompatible types does not raise a static error, but crashes during interpretation.
To Reproduce
Expected behavior A static error from the type checker, like the one for assignment
Desktop:
0.40.11