rsc icon indicating copy to clipboard operation
rsc copied to clipboard

Simplify simple forSome existential types into wildcard existentials

Open wiwa opened this issue 6 years ago • 2 comments

Instead of ascribing

val x: Foo[X] forSome { type X }

we will ascribe

val x: Foo[_]

wiwa avatar Jan 25 '19 19:01 wiwa

This is an old ticket and we don't have a reproduction for the issue or know if it is still valid so I am closing it for now.

ShaneDelmore avatar Jul 10 '19 19:07 ShaneDelmore

Given:

class Box[A]

def foo = null.asInstanceOf[Box[_]]

Obtained:

def foo: Box[T1] forSome { type T1 } = null.asInstanceOf[Box[_]]

Expected:

def foo: Box[_] = null.asInstanceOf[Box[_]]

Relates to #471 and requires Box to be invariant.

wiwa avatar Aug 08 '19 17:08 wiwa