Open
Description
Welcome to Scala 2.12.4 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_152).
Type in expressions for evaluation. Or try :help.
scala> type A = {
| def self: Some[Any]
| }
defined type alias A
scala> type B = {
| def self: Option[String]
| }
defined type alias B
scala> def convert(ab: A with B): A = ab
<console>:13: error: type mismatch;
found : A with B
required: A
(which expands to) AnyRef{def self: Some[Any]}
def convert(ab: A with B): A = ab
^