diff options
author | Martin Odersky <odersky@gmail.com> | 2013-07-22 16:05:38 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2013-07-22 16:05:38 +0200 |
commit | 9169d5ee101ef7d4f6b797e64e06e4e5df2de7e9 (patch) | |
tree | 447b55ceb55ab874d161ed2fefd65a78df7ff8bf /src/dotty/tools/dotc/core/Types.scala | |
parent | b3d0902d2219f9680180b17ff7f0b22aa11aae90 (diff) | |
download | dotty-9169d5ee101ef7d4f6b797e64e06e4e5df2de7e9.tar.gz dotty-9169d5ee101ef7d4f6b797e64e06e4e5df2de7e9.tar.bz2 dotty-9169d5ee101ef7d4f6b797e64e06e4e5df2de7e9.zip |
Avoid typeArgs when baseType is involved.
Going through baseType.typeArgs does not work, as the baseType is not structurally a type application.
Diffstat (limited to 'src/dotty/tools/dotc/core/Types.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/Types.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/core/Types.scala b/src/dotty/tools/dotc/core/Types.scala index af2b694f5..468c5f58a 100644 --- a/src/dotty/tools/dotc/core/Types.scala +++ b/src/dotty/tools/dotc/core/Types.scala @@ -748,14 +748,14 @@ object Types { /** The type arguments of the base type instance wrt `base` of this type */ final def baseTypeArgs(base: Symbol)(implicit ctx: Context): List[Type] = - if (this <:< base.symRef) + if (this derivesFrom base) base.typeParams map (param => member(param.name).info.argType(param)) else Nil /** The first type argument of the base type instance wrt `base` of this type */ final def firstBaseTypeArg(base: Symbol)(implicit ctx: Context): Type = base.typeParams match { - case param :: _ if this <:< base.symRef => + case param :: _ if this derivesFrom base => member(param.name).info.argType(param) case _ => NoType |