File tree Expand file tree Collapse file tree 2 files changed +2
-3
lines changed
src/dotty/tools/dotc/typer Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -775,14 +775,13 @@ trait Applications extends Compatibility { self: Typer with Dynamic =>
775
775
* The generalizations of a type T are the smallest set G such that
776
776
*
777
777
* - T is in G
778
- * - If a typeref R in G represents a trait, R's superclass is in G.
778
+ * - If a typeref R in G represents a class or trait, R's superclass is in G.
779
779
* - If a type proxy P is not a reference to a class, P's supertype is in G
780
780
*/
781
781
def isSubTypeOfParent (subtp : Type , tp : Type )(implicit ctx : Context ): Boolean =
782
782
if (subtp <:< tp) true
783
783
else tp match {
784
- case tp : TypeRef if tp.symbol.isClass =>
785
- tp.symbol.is(Trait ) && isSubTypeOfParent(subtp, tp.firstParent)
784
+ case tp : TypeRef if tp.symbol.isClass => isSubTypeOfParent(subtp, tp.firstParent)
786
785
case tp : TypeProxy => isSubTypeOfParent(subtp, tp.superType)
787
786
case _ => false
788
787
}
File renamed without changes.
You can’t perform that action at this time.
0 commit comments