File tree Expand file tree Collapse file tree 3 files changed +12
-1
lines changed
compiler/src/dotty/tools/dotc/core
docs/_docs/reference/experimental Expand file tree Collapse file tree 3 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -2654,6 +2654,10 @@ class TypeComparer(@constructorOnly initctx: Context) extends ConstraintHandling
26542654 fullyInstantiated(tp2) && ! tp1.classSymbols.exists(_.derivesFrom(tp2.symbol))
26552655 case (tp1 : TypeRef , tp2 : TermRef ) if isEnumValue(tp2) =>
26562656 fullyInstantiated(tp1) && ! tp2.classSymbols.exists(_.derivesFrom(tp1.symbol))
2657+ case (tp1 : RefinedType , tp2 : RefinedType ) if tp1.refinedName == tp2.refinedName =>
2658+ provablyDisjoint(tp1.parent, tp2.parent) || provablyDisjoint(tp1.refinedInfo, tp2.refinedInfo)
2659+ case (tp1 : TypeAlias , tp2 : TypeAlias ) =>
2660+ provablyDisjoint(tp1.alias, tp2.alias)
26572661 case (tp1 : Type , tp2 : Type ) if defn.isTupleNType(tp1) =>
26582662 provablyDisjoint(tp1.toNestedPairs, tp2)
26592663 case (tp1 : Type , tp2 : Type ) if defn.isTupleNType(tp2) =>
Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ trait FromDigits[T]:
7373 def fromDigits (digits : String ): T
7474```
7575
76- Implementations of the ` fromDigits ` convert strings of digits to the values of the
76+ Implementations of ` fromDigits ` convert strings of digits to the values of the
7777implementation type ` T ` .
7878The ` digits ` string consists of digits between ` 0 ` and ` 9 ` , possibly preceded by a
7979sign ("+" or "-"). Number separator characters ` _ ` are filtered out before
Original file line number Diff line number Diff line change 1+ type F [t] =
2+ t match
3+ case {type A = Float } => Int
4+ case {type A = Int } => String
5+
6+ val a : F [{type A = Float }] = 10
7+ val b : F [{type A = Int }] = " asd" // Found:("asd" : String) Required: F[Object{A = Int}]
You can’t perform that action at this time.
0 commit comments