diff options
author | Martin Odersky <odersky@gmail.com> | 2013-03-21 21:30:30 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2013-03-21 21:30:30 +0100 |
commit | 5b4f154c9e4c2c6ff48ac68b8d984e306853328f (patch) | |
tree | b79b81c86c31a7b6b6b34801dc81346413e5a699 /src/dotty/tools/dotc/core/Types.scala | |
parent | 5ac2104e688409e24785cfe62cdc7e8ef0bc6428 (diff) | |
download | dotty-5b4f154c9e4c2c6ff48ac68b8d984e306853328f.tar.gz dotty-5b4f154c9e4c2c6ff48ac68b8d984e306853328f.tar.bz2 dotty-5b4f154c9e4c2c6ff48ac68b8d984e306853328f.zip |
More fixes to classfile reading.
Can now read all classes in scala.collection.generic. Some failures remain for their companion objects.
Diffstat (limited to 'src/dotty/tools/dotc/core/Types.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/Types.scala | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/core/Types.scala b/src/dotty/tools/dotc/core/Types.scala index 252901b17..b061a1227 100644 --- a/src/dotty/tools/dotc/core/Types.scala +++ b/src/dotty/tools/dotc/core/Types.scala @@ -551,7 +551,13 @@ object Types { } def hkRefinement(tp: TypeRef): Type = { - val hkArgs = hkApp(tp.info).typeArgs + val hkArgs = + if (tp.symbol.isCompleting) + // This can happen if a higher-kinded type appears applied to arguments in its own bounds. + // TODO: Catch this case and mark as "proceed at own risk" later. + args map (_ => defn.InvariantBetweenClass.typeConstructor) + else + hkApp(tp.info).typeArgs ((tp: Type) /: hkArgs.zipWithIndex.zip(args)) { case (parent, ((hkArg, idx), arg)) => val vsym = hkArg.typeSymbol @@ -1627,6 +1633,10 @@ object Types { name.isTermName && (pre member name).hasAltWith(_ is Deferred) } + object takeAllFilter extends NameFilter { + def apply(pre: Type, name: Name)(implicit ctx: Context): Boolean = true + } + // ----- Exceptions ------------------------------------------------------------- class TypeError(msg: String) extends Exception(msg) |