summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2006-05-11 14:15:01 +0000
committerMartin Odersky <odersky@gmail.com>2006-05-11 14:15:01 +0000
commit88a1448f33fbd271eefe9c155015a5c31eb223bc (patch)
tree9cb58ada7d969a754377b24b760484e6ba624d1f /src
parent6ce297f44c96ff884537ae00ebfeb235f267a2dd (diff)
downloadscala-88a1448f33fbd271eefe9c155015a5c31eb223bc.tar.gz
scala-88a1448f33fbd271eefe9c155015a5c31eb223bc.tar.bz2
scala-88a1448f33fbd271eefe9c155015a5c31eb223bc.zip
Bug fixes
Diffstat (limited to 'src')
-rw-r--r--src/compiler/scala/tools/nsc/Global.scala2
-rw-r--r--src/compiler/scala/tools/nsc/symtab/Types.scala7
2 files changed, 5 insertions, 4 deletions
diff --git a/src/compiler/scala/tools/nsc/Global.scala b/src/compiler/scala/tools/nsc/Global.scala
index da135674a1..c6569088d0 100644
--- a/src/compiler/scala/tools/nsc/Global.scala
+++ b/src/compiler/scala/tools/nsc/Global.scala
@@ -341,7 +341,7 @@ class Global(val settings: Settings, val reporter: Reporter) extends SymbolTable
inliner,
closser,
genJVM,
- sampleTransform);
+ sampleTransform)
protected def insertBefore(c: SubComponent, cs: List[SubComponent], before: SubComponent): List[SubComponent] = cs match {
case List() => List(c)
diff --git a/src/compiler/scala/tools/nsc/symtab/Types.scala b/src/compiler/scala/tools/nsc/symtab/Types.scala
index 0b3c16e56d..18b6cd0a01 100644
--- a/src/compiler/scala/tools/nsc/symtab/Types.scala
+++ b/src/compiler/scala/tools/nsc/symtab/Types.scala
@@ -1671,6 +1671,7 @@ trait Types requires SymbolTable {
/** Does member `sym1' of `tp1' have a stronger type than member `sym2' of `tp2'? */
private def specializesSym(tp1: Type, sym1: Symbol, tp2: Type, sym2: Symbol): boolean = {
+// System.out.println("specializes " + tp1 + " " + tp2)//DEBUG
val info1 = tp1.memberInfo(sym1);
val info2 = tp2.memberInfo(sym2).substThis(tp2.symbol, tp1);
(sym2.isTerm &&
@@ -1886,9 +1887,9 @@ trait Types requires SymbolTable {
((t, sym) => t.memberInfo(sym).substThis(t.symbol, lubThisType)));
if (settings.debug.value) log("common symbols: " + syms + ":" + symtypes);//debug
if (proto.isTerm)
- proto.cloneSymbol.setInfo(lub(symtypes))
+ proto.cloneSymbol(lubType.symbol).setInfo(lub(symtypes))
else if (symtypes.tail forall (symtypes.head =:=))
- proto.cloneSymbol.setInfo(symtypes.head)
+ proto.cloneSymbol(lubType.symbol).setInfo(symtypes.head)
else {
def lubBounds(bnds: List[TypeBounds]): TypeBounds =
TypeBounds(glb(bnds map (.lo)), lub(bnds map (.hi)));
@@ -1955,7 +1956,7 @@ trait Types requires SymbolTable {
glbThisType.memberInfo(alt) matches prototp) yield alt;
val symtypes = syms map glbThisType.memberInfo;
assert(!symtypes.isEmpty);
- proto.cloneSymbol.setInfo(
+ proto.cloneSymbol(glbType.symbol).setInfo(
if (proto.isTerm) glb(symtypes)
else {
def isTypeBound(tp: Type) = tp match {