diff options
author | Martin Odersky <odersky@gmail.com> | 2016-07-18 12:55:07 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2016-07-18 13:09:21 +0200 |
commit | 60be18cce509bae1ed0d6c68b910f4bed10fa889 (patch) | |
tree | 00eb2520cf6562d2484e43088590f5cf869189a0 /src/dotty/tools/dotc/typer | |
parent | 7c0c1f31fda704e790ca7a9d260c8c956b28d447 (diff) | |
download | dotty-60be18cce509bae1ed0d6c68b910f4bed10fa889.tar.gz dotty-60be18cce509bae1ed0d6c68b910f4bed10fa889.tar.bz2 dotty-60be18cce509bae1ed0d6c68b910f4bed10fa889.zip |
Add test case
Also fix reviewers comments about `firstParent`
Diffstat (limited to 'src/dotty/tools/dotc/typer')
-rw-r--r-- | src/dotty/tools/dotc/typer/Applications.scala | 2 |
1 files changed, 1 insertions, 1 deletions
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 } |