You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The previous code was a great demonstration of the perils of mixing mutable variables with
delayed evaluation.
Also, make lazy vals in Message @ThreadUnsafe. This means that any recursion (like the one we
encountered before the fix) manifests itself in stackoverflows instead of deadlocks.
Fixesscala#12220
Compiler version
scala3-3.0.0-RC3
$ java -version
openjdk version "1.8.0_272"
OpenJDK Runtime Environment (build 1.8.0_272-b10)
OpenJDK 64-Bit Server VM (build 25.272-b10, mixed mode)
Minimized code
Output
the above code hangs forever with no output, and with zero CPU usage.
If i do the same cast in a separate val, i get the expected compilation error:
Expectation
Compilation fails with "Missing parameter type ..." error
The text was updated successfully, but these errors were encountered: