summaryrefslogtreecommitdiff
path: root/src/compiler
diff options
context:
space:
mode:
authorBurak Emir <emir@epfl.ch>2007-01-30 20:59:31 +0000
committerBurak Emir <emir@epfl.ch>2007-01-30 20:59:31 +0000
commit97e6e4eb2740536f98cd4172a12c9568c48e03d3 (patch)
tree1acd611daeda2b5217728d33409d3fe5416e310e /src/compiler
parent607c9b39ae30591dc1e07b4bb9071da3ab6b066f (diff)
downloadscala-97e6e4eb2740536f98cd4172a12c9568c48e03d3.tar.gz
scala-97e6e4eb2740536f98cd4172a12c9568c48e03d3.tar.bz2
scala-97e6e4eb2740536f98cd4172a12c9568c48e03d3.zip
reverted more still broke
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/scala/tools/nsc/ast/Trees.scala2
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Typers.scala15
2 files changed, 4 insertions, 13 deletions
diff --git a/src/compiler/scala/tools/nsc/ast/Trees.scala b/src/compiler/scala/tools/nsc/ast/Trees.scala
index e3c4f629e4..4c760c7e12 100644
--- a/src/compiler/scala/tools/nsc/ast/Trees.scala
+++ b/src/compiler/scala/tools/nsc/ast/Trees.scala
@@ -436,7 +436,7 @@ trait Trees requires Global {
vparamss map (.map (vd => {
val ret = ValDef(Modifiers(vd.mods.flags & IMPLICIT | PARAM) setAttr vd.mods.attributes,
vd.name, vd.tpt.duplicate, EmptyTree).setPos(vd.pos)
- if (true /*(bq) was: inIDE*/ && vd.symbol != NoSymbol)
+ if (false /*(bq) was: inIDE*/ && vd.symbol != NoSymbol)
ret.symbol = vd.symbol
ret
}));
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
index a7886174c7..39a3441f20 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
@@ -627,15 +627,10 @@ trait Typers requires Analyzer {
tree
} else {
if ((mode & PATTERNmode) != 0) {
- if ((tree.symbol ne null) && tree.symbol.isModule) {
- //if (definitions.unapplyMember(tree.symbol.tpe).exists) { // bq:unapply, typedSelect / Stream.cons
- // return tree
- //} else {
+ if ((tree.symbol ne null) && tree.symbol.isModule)
inferModulePattern(tree, pt)
- if (isPopulated(tree.tpe, approximateAbstracts(pt)))
- return tree
- //}
- }
+ if (isPopulated(tree.tpe, approximateAbstracts(pt)))
+ return tree
}
val tree1 = constfold(tree, pt) // (10) (11)
if (tree1.tpe <:< pt) adapt(tree1, mode, pt)
@@ -1668,10 +1663,6 @@ trait Typers requires Analyzer {
val qual1 = adaptToName(qual, name)
if (qual1 ne qual) return typed(copy.Select(tree, qual1, name), mode, pt)
}
- if (sym == NoSymbol && name != nme.CONSTRUCTOR && name.isTypeName && (mode & PATTERNmode) != 0) { // look for unapply
- // bq: this hack is analogous to the hack in unapply
- return typedSelect(qual, name.toTermName)
- }
if (!sym.exists) {
if (settings.debug.value) Console.err.println("qual = "+qual+":"+qual.tpe+"\nSymbol="+qual.tpe.symbol+"\nsymbol-info = "+qual.tpe.symbol.info+"\nscope-id = "+qual.tpe.symbol.info.decls.hashCode()+"\nmembers = "+qual.tpe.members+"\nname = "+name+"\nfound = "+sym+"\nowner = "+context.enclClass.owner)
if (!qual.tpe.widen.isErroneous) {