From 60be18cce509bae1ed0d6c68b910f4bed10fa889 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Mon, 18 Jul 2016 12:55:07 +0200 Subject: Add test case Also fix reviewers comments about `firstParent` --- src/dotty/tools/dotc/typer/Applications.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/dotty/tools/dotc/typer') diff --git a/src/dotty/tools/dotc/typer/Applications.scala b/src/dotty/tools/dotc/typer/Applications.scala index f7a96c6b4..262e6a087 100644 --- a/src/dotty/tools/dotc/typer/Applications.scala +++ b/src/dotty/tools/dotc/typer/Applications.scala @@ -751,7 +751,7 @@ trait Applications extends Compatibility { self: Typer with Dynamic => if (subtp <:< tp) true else tp match { case tp: TypeRef if tp.symbol.isClass => - tp.symbol.is(Trait) && isSubTypeOfParent(subtp, tp.parents.head) + tp.symbol.is(Trait) && isSubTypeOfParent(subtp, tp.firstParent) case tp: TypeProxy => isSubTypeOfParent(subtp, tp.superType) case _ => false } -- cgit v1.2.3