File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
compiler/src/dotty/tools/dotc/core Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -2528,7 +2528,7 @@ class TypeComparer(@constructorOnly initctx: Context) extends ConstraintHandling
2528
2528
2529
2529
/** Can we enumerate all instantiations of this type? */
2530
2530
def isClosedSum (tp : Symbol ): Boolean =
2531
- tp.is(Sealed ) && tp.isOneOf( AbstractOrTrait ) && ! tp.hasAnonymousChild
2531
+ tp.is(Sealed ) && ! tp.hasAnonymousChild
2532
2532
2533
2533
/** Splits a closed type into a disjunction of smaller types.
2534
2534
* It should hold that `tp` and `decompose(tp).reduce(_ or _)`
Original file line number Diff line number Diff line change
1
+ sealed class R
2
+
3
+ type X [T ] = T match {
4
+ case R => String
5
+ case (z => r) => Int
6
+ }
7
+ def x [T ]: X [T ] = ???
8
+
9
+ def i (i0 : Int ): Unit = ???
10
+ val a = i(x[Int => String ])
You can’t perform that action at this time.
0 commit comments