diff options
author | Martin Odersky <odersky@gmail.com> | 2007-08-30 13:39:15 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2007-08-30 13:39:15 +0000 |
commit | 3527c51675fd580d6d61f3252eb34e6fbba44226 (patch) | |
tree | 5629155492df419560d878f99c1bde2db8ef4963 /src/compiler | |
parent | 658fc638ac76f04092eccbf58850212130771cbf (diff) | |
download | scala-3527c51675fd580d6d61f3252eb34e6fbba44226.tar.gz scala-3527c51675fd580d6d61f3252eb34e6fbba44226.tar.bz2 scala-3527c51675fd580d6d61f3252eb34e6fbba44226.zip |
fixed lift build problem.
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/scala/tools/nsc/symtab/Symbols.scala | 4 | ||||
-rw-r--r-- | src/compiler/scala/tools/nsc/symtab/Types.scala | 17 |
2 files changed, 17 insertions, 4 deletions
diff --git a/src/compiler/scala/tools/nsc/symtab/Symbols.scala b/src/compiler/scala/tools/nsc/symtab/Symbols.scala index 8d0a6f9649..5cba998f38 100644 --- a/src/compiler/scala/tools/nsc/symtab/Symbols.scala +++ b/src/compiler/scala/tools/nsc/symtab/Symbols.scala @@ -43,6 +43,7 @@ trait Symbols { var rawflags: Long = 0 private var rawpos = initPos val id = { ids += 1; ids } +// assert(id != 4699, initName+"/"+initOwner) var validTo: Period = NoPeriod @@ -1333,8 +1334,7 @@ trait Symbols { override def name: Name = if (phase.flatClasses && rawowner != NoSymbol && !rawowner.isPackageClass) { if (flatname == nme.EMPTY) { - if(!rawowner.isClass) { Console.print("warning, is not a class, actually: "+rawowner.name.toString)} - //assert(rawowner.isClass) //bq: assert here shadows more important messages + assert(rawowner.isClass) flatname = newTypeName(rawowner.name.toString() + "$" + rawname) } flatname diff --git a/src/compiler/scala/tools/nsc/symtab/Types.scala b/src/compiler/scala/tools/nsc/symtab/Types.scala index a634233d74..3017d0e74b 100644 --- a/src/compiler/scala/tools/nsc/symtab/Types.scala +++ b/src/compiler/scala/tools/nsc/symtab/Types.scala @@ -236,7 +236,7 @@ trait Types { */ def typeOfThis: Type = typeSymbol.typeOfThis - /** Map to a this type which is a subtype of this type. + /** Map to a singleton type which is a subtype of this type. */ def narrow: Type = if (phase.erasedTypes) this @@ -862,6 +862,7 @@ trait Types { } underlyingCache } +/* override def narrow: Type = { if (phase.erasedTypes) this else { @@ -873,6 +874,8 @@ trait Types { thissym.thisType } } +*/ + override def narrow: Type = this override def termSymbol = sym @deprecated override def symbol = sym @@ -1338,10 +1341,16 @@ A type's typeSymbol should never be inspected directly. override def typeOfThis = transform(sym.typeOfThis) +/* override def narrow = if (sym.isModuleClass) transform(sym.thisType) else if (sym.isAliasType) normalize.narrow else super.narrow +*/ + override def narrow = + if (sym.isModuleClass) singleType(pre, sym.sourceModule) + else if (sym.isAliasType) normalize.narrow + else super.narrow override def prefix: Type = if (sym.isAliasType) normalize.prefix @@ -3480,7 +3489,11 @@ A type's typeSymbol should never be inspected directly. case ex: NoCommonType => } } - if (lubRefined.decls.isEmpty) lubBase else lubRefined + if (lubRefined.decls.isEmpty) lubBase + else { +// println("refined lub of "+ts+"/"+narrowts+" is "+lubRefined+", baseclasses = "+(ts map (_.closure) map (_.toList))) + lubRefined + } } existentialAbstraction(tparams, lubType) } |