-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Labels
fixed in Scala 3This issue does not exist in the Scala 3 compiler (https://github.com/lampepfl/dotty/)This issue does not exist in the Scala 3 compiler (https://github.com/lampepfl/dotty/)typer
Milestone
Description
scala> class Foo[S] { type X = List[S]; val x: X = List() }
defined class Foo
scala> new Foo[Int].x : List[Int]
res0: List[Int] = List()
scala> def foo[S] = { type X = List[S]; List():X }
foo: [S]=> X
scala> foo[Int] : List[Int]
<console>:9: error: type mismatch;
found : X
(which expands to) List[S]
required: List[Int]
foo[Int] : List[Int]
^
Metadata
Metadata
Assignees
Labels
fixed in Scala 3This issue does not exist in the Scala 3 compiler (https://github.com/lampepfl/dotty/)This issue does not exist in the Scala 3 compiler (https://github.com/lampepfl/dotty/)typer