-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
area:match-typesitype:bugregressionThis worked in a previous version but doesn't anymoreThis worked in a previous version but doesn't anymore
Milestone
Description
Compiler version
3.4.0 and higher
Minimized code
//> using scala 3.4.0
trait Column:
type T
type F[X]
type Q = F[T]
class varchar extends Column:
type T = String
trait notnull extends Column:
type F[X] = X
object Error:
val firstName = new varchar with notnull
val lastName = new varchar with notnull
val relation = (firstName, lastName)
type RelationTypes = Tuple.InverseMap[relation.type, [X] =>> Column { type Q = X }]
summon[RelationTypes =:= (String, String)]
object Works:
object firstName extends varchar with notnull
object lastName extends varchar with notnull
val relation = (firstName, lastName)
type RelationTypes = Tuple.InverseMap[relation.type, [X] =>> Column { type Q = X }]
summon[RelationTypes =:= (String, String)]
Output
Compiling project (Scala 3.4.0, JVM (8))
[error] .\test.scala:23:45
[error] Cannot prove that Error.RelationTypes =:= (String, String).
[error] summon[RelationTypes =:= (String, String)]
[error] ^
Error compiling project (Scala 3.4.0, JVM (8))
Compilation failed
Expectation
Successful compilation.
Metadata
Metadata
Assignees
Labels
area:match-typesitype:bugregressionThis worked in a previous version but doesn't anymoreThis worked in a previous version but doesn't anymore