-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
area:nullabilityarea:strictEqualityscala.language.strictEqualityscala.language.strictEqualityitype:bug
Milestone
Description
Compiler version
3.5.1-RC2
Minimized code
import scala.collection.LinearSeq
def foo[T](a: LinearSeq[T]) = a match
case Nil => -1
case head +: tail => headCompiler options
-language:strictEquality
-Yexplicit-nulls
Compiler output
Values of types object Nil and LinearSeq[T] cannot be compared with == or !=.Expectation
No compile-error
Note: the addition of CanEqual givens between Nil.type and LinearSeq does not help.
Metadata
Metadata
Assignees
Labels
area:nullabilityarea:strictEqualityscala.language.strictEqualityscala.language.strictEqualityitype:bug