bug icon indicating copy to clipboard operation
bug copied to clipboard

Potential existential variable escape

Open scabug opened this issue 17 years ago • 3 comments

scala> val x : ({ val y : T } forSome { type T }) = new { val y = 3 }
x: AnyRef{def y: T} forSome { type T } = $$anon$$1@bb0f79

scala> x.y
res0: T = 3

scala> val z : T = x.y
<console>:5: error: not found: type T
       val z : T = x.y

scabug avatar Feb 14 '08 09:02 scabug