summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBurak Emir <emir@epfl.ch>2006-11-06 18:09:19 +0000
committerBurak Emir <emir@epfl.ch>2006-11-06 18:09:19 +0000
commit3125604fb0fad1f7d2e72498076c966402489f70 (patch)
tree32bfa5f5b5e8ba313ded65c2bf76e4a941f39ff8
parentd8de14d630038f6358facbdd8dab577271fcd024 (diff)
downloadscala-3125604fb0fad1f7d2e72498076c966402489f70.tar.gz
scala-3125604fb0fad1f7d2e72498076c966402489f70.tar.bz2
scala-3125604fb0fad1f7d2e72498076c966402489f70.zip
revisited fix #796 + ident handling for unapply...
revisited fix #796 + ident handling for unapply (can compile library with -Xunapply now)
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Infer.scala6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Infer.scala b/src/compiler/scala/tools/nsc/typechecker/Infer.scala
index 56648f4715..f85be9d6d7 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Infer.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Infer.scala
@@ -873,10 +873,8 @@ trait Infer requires Analyzer {
val pt1 = pt.subst(ptparams, ptvars)
if (pat.tpe <:< pt1)
ptvars foreach instantiateTypeVar
- else {
- if(!(definitions.unapplyMember(pat.tpe).exists && settings.Xunapply.value))
- error(pat.pos, "pattern type is incompatibe with expected type"+foundReqMsg(pat.tpe, pt))
- }
+ else
+ error(pat.pos, "pattern type is incompatibe with expected type"+foundReqMsg(pat.tpe, pt))
}
object toOrigin extends TypeMap {