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
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:
defrepro[A](as: List[A]):List[A] =
as matchcaseNil=>Nilcase _ =>???
This code causes a compile error, if compiled with scala3-compiler (version 3.3.1) and any of the following flag orders:
crater2150
changed the title
Compiler flags to using options are order-dependent
Consecutive -language:... Compiler flags in using options are ignored
Nov 15, 2023
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: