aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2013-03-23 16:32:48 +0100
committerMartin Odersky <odersky@gmail.com>2013-03-23 16:37:57 +0100
commit6c6f77682f95496feef72cc0ecd3ba00ccbdfa49 (patch)
treebbef00b1cf62ac58e2847661c56981901526e511 /src/dotty/tools/dotc
parentf73792d9c6a41c692cc689c52e481e15120bccc4 (diff)
downloaddotty-6c6f77682f95496feef72cc0ecd3ba00ccbdfa49.tar.gz
dotty-6c6f77682f95496feef72cc0ecd3ba00ccbdfa49.tar.bz2
dotty-6c6f77682f95496feef72cc0ecd3ba00ccbdfa49.zip
Some more fixes for classfile loading
Diffstat (limited to 'src/dotty/tools/dotc')
-rw-r--r--src/dotty/tools/dotc/core/Printers.scala2
-rw-r--r--src/dotty/tools/dotc/core/SymbolLoaders.scala4
-rw-r--r--src/dotty/tools/dotc/core/Types.scala13
3 files changed, 14 insertions, 5 deletions
diff --git a/src/dotty/tools/dotc/core/Printers.scala b/src/dotty/tools/dotc/core/Printers.scala
index 0f8cc05f9..de9677a3a 100644
--- a/src/dotty/tools/dotc/core/Printers.scala
+++ b/src/dotty/tools/dotc/core/Printers.scala
@@ -356,7 +356,7 @@ object Printers {
def locationText(sym: Symbol): Text = {
val owns = sym.effectiveOwner
- if (owns.isClass && !isEmptyPrefix(owns)) "in " ~ toText(owns) else Text()
+ if (owns.isClass && !isEmptyPrefix(owns)) " in " ~ toText(owns) else Text()
}
def locatedText(sym: Symbol): Text =
diff --git a/src/dotty/tools/dotc/core/SymbolLoaders.scala b/src/dotty/tools/dotc/core/SymbolLoaders.scala
index aa29e9d0c..c2b873bc9 100644
--- a/src/dotty/tools/dotc/core/SymbolLoaders.scala
+++ b/src/dotty/tools/dotc/core/SymbolLoaders.scala
@@ -95,8 +95,8 @@ class SymbolLoaders {
val clazz = enterClass(owner, name, completer, flags, scope)
val module = enterModule(
owner, name, completer,
- modFlags = flags & RetainedModuleValFlags,
- clsFlags = flags & RetainedModuleClassFlags,
+ modFlags = flags.toTermFlags & RetainedModuleValFlags,
+ clsFlags = flags.toTypeFlags & RetainedModuleClassFlags,
scope = scope)
}
diff --git a/src/dotty/tools/dotc/core/Types.scala b/src/dotty/tools/dotc/core/Types.scala
index 74bf684e1..445f4c634 100644
--- a/src/dotty/tools/dotc/core/Types.scala
+++ b/src/dotty/tools/dotc/core/Types.scala
@@ -556,8 +556,15 @@ object Types {
// 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
+ else {
+ if (tp.info == NoType) {
+ println(s"typeless type ref: $tp")
+ debugTrace = true
+ tp.prefix.member(tp.name)
+ }
+
hkApp(tp.info).typeArgs
+ }
((tp: Type) /: hkArgs.zipWithIndex.zip(args)) {
case (parent, ((hkArg, idx), arg)) =>
val vsym = hkArg.typeSymbol
@@ -1026,7 +1033,7 @@ object Types {
}
/** The type of a super reference cls.super where
- * `thistpe` is cls.this and `supertpe` is the type of the valye referenced
+ * `thistpe` is cls.this and `supertpe` is the type of the value referenced
* by `super`.
*/
abstract case class SuperType(thistpe: Type, supertpe: Type) extends CachedProxyType with SingletonType {
@@ -1669,4 +1676,6 @@ object Types {
}
case _ => ys.isEmpty
}
+
+ var debugTrace = false
}