Consecutive -language:...
Compiler flags in using options
are ignored
#2549
Labels
bug
Something isn't working
Version(s)
1.0.6
Describe the bug
If two
-language:
flags appear next to each other in a//> using options
directive, the second one is ignored. The different behaviour is not reproducible by calling the Scala 3 compiler directly.To Reproduce
I stumbled upon this while encountering a bug where
strictEquality
breaks if-Yexplicit-nulls
is enabled, so that is what the examples use:This code causes a compile error, if compiled with
scala3-compiler
(version 3.3.1) and any of the following flag orders:Compiling with
scala-cli compile
, the behavior is the same for the first five, but the last three compile without error, e.g.To run all of the above compilations of flags, I used this script: https://gist.github.com/crater2150/4950128bbde80437d0ba6077fd94f805
Expected behaviour
-language:...
flags should work without other flags between them.The text was updated successfully, but these errors were encountered: