-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nil and LinearSeq cannot be compared #21392
Comments
It is weird that the error only happens if both flags are enabled. |
Hello, one more example. This bug is really blocking usage of strictEquality. Exampleenum Foo:
case Bar
case Baz(x: String)
def foo(a: Foo) = a match
case Foo.Bar => -1
case _ => 0 OutputValues of types Playground.Foo and Playground.Foo cannot be compared with == or != |
For this example, the error is not related to explicit nulls, and you need to add |
Hmm, ok) Thank you. |
Compiler version
3.5.1-RC2
Minimized code
Compiler options
Compiler output
Expectation
No compile-error
Note: the addition of
CanEqual
givens betweenNil.type
andLinearSeq
does not help.The text was updated successfully, but these errors were encountered: