Compiler version
3.8.0-RC1-bin-20250818-aaa39c5-NIGHTLY
Minimized code
minim1.scala:
// without Yexplicit-nulls
extension (inline x: AnyRef | Null)
inline infix def customNe(inline y: AnyRef | Null): Boolean =
!(x eq y)
minim.test.scala:
//> using options -Yexplicit-nulls
def Test =
val bucket: Null = ???
if (bucket customNe null) then
println("not null")
scala-cli minim1.scala minim2.test.scala -S 3.8.0-RC1-bin-20250818-aaa39c5-NIGHTLY --test
Output
[error] ./minim2.test.scala:5:7
[error] expression does not take parameters
[error] if (bucket customNe null) then
[error] ^^^^^^^^^^^^^^^^^^^^
Expectation
No error or error thrown at the typer phase