summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/Typers.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2006-03-20 12:03:12 +0000
committerMartin Odersky <odersky@gmail.com>2006-03-20 12:03:12 +0000
commit5459db1226b86027e0817acb0a2f41e0c12b28ed (patch)
tree2662cea2c40283eadcdccb5d53d58f769a825601 /src/compiler/scala/tools/nsc/typechecker/Typers.scala
parent4ddf81c21818dadb435a4a43b91ae69688d8bc1d (diff)
downloadscala-5459db1226b86027e0817acb0a2f41e0c12b28ed.tar.gz
scala-5459db1226b86027e0817acb0a2f41e0c12b28ed.tar.bz2
scala-5459db1226b86027e0817acb0a2f41e0c12b28ed.zip
1.
2. Changed method compareTo in class Ordered to compare. 3. Moved retsynch to pending 4. Fixed bug 550
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Typers.scala')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Typers.scala10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
index b9e435c7b6..0ad7cd9100 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
@@ -22,7 +22,7 @@ trait Typers requires Analyzer {
var implcnt = 0
var impltime = 0l
- final val xviews = false
+ final val xviews = true
private val transformed = new HashMap[Tree, Tree]
@@ -396,7 +396,7 @@ trait Typers requires Analyzer {
if (clazz.hasFlag(CASE)) { // (5.1)
val tree1 = TypeTree(clazz.primaryConstructor.tpe.asSeenFrom(tree.tpe.prefix, clazz.owner)) setOriginal tree
try {
- inferConstructorInstance(tree1, clazz.unsafeTypeParams, pt)
+ inferConstructorInstance(tree1, clazz.typeParams, pt)
} catch {
case npe : NullPointerException =>
logError("CONTEXT: " + context . unit . source .dbg(tree.pos), npe);
@@ -427,7 +427,7 @@ trait Typers requires Analyzer {
}
} else if ((mode & FUNmode) != 0) {
tree
- } else if (tree.hasSymbol && !tree.symbol.unsafeTypeParams.isEmpty) { // (7)
+ } else if (tree.hasSymbol && !tree.symbol.typeParams.isEmpty) { // (7)
errorTree(tree, ""+clazz+" takes type parameters")
} else tree match { // (6)
case TypeTree() => tree
@@ -1402,7 +1402,7 @@ trait Typers requires Analyzer {
case New(tpt: Tree) =>
var tpt1 = typedTypeConstructor(tpt)
if (tpt1.hasSymbol && !tpt1.symbol.typeParams.isEmpty) {
- context.undetparams = cloneSymbols(tpt1.symbol.unsafeTypeParams)
+ context.undetparams = cloneSymbols(tpt1.symbol.typeParams)
tpt1 = TypeTree()
.setOriginal(tpt1) /* .setPos(tpt1.pos) */
.setType(appliedType(tpt1.tpe, context.undetparams map (.tpe)))
@@ -1755,6 +1755,8 @@ trait Typers requires Analyzer {
else errorTree(tree, "no implicit argument matching parameter type "+pt+" was found.")
}
Apply(tree, formals map implicitArg) setPos tree.pos
+ case ErrorType =>
+ tree
}
}
}