Skip to content

Refinement classes should not be eligible for SAMs #183

Closed
@retronym

Description

@retronym

Currently, we walk into class cast exceptions.

scala> trait T { def t(a: Any): Any }; trait U; abstract class C extends T
defined trait T
defined trait U
defined class C

scala> ((x => x): T with U): U
java.lang.ClassCastException: $$Lambda$1143/103433239 cannot be cast to U
  ... 28 elided

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions