summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/Typers.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2007-02-27 22:47:32 +0000
committerMartin Odersky <odersky@gmail.com>2007-02-27 22:47:32 +0000
commit79e3814ced4b75b82f17f3b8a9c39b8e07256736 (patch)
tree0b1307deac98b1d94012ba8a97d7497dacfd33ec /src/compiler/scala/tools/nsc/typechecker/Typers.scala
parent0b433a78b45aa63c0218d8af51bb5c4098e562d2 (diff)
downloadscala-79e3814ced4b75b82f17f3b8a9c39b8e07256736.tar.gz
scala-79e3814ced4b75b82f17f3b8a9c39b8e07256736.tar.bz2
scala-79e3814ced4b75b82f17f3b8a9c39b8e07256736.zip
fixed bug961
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Typers.scala')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Typers.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
index 2d6ffbb099..a61ab3a339 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
@@ -1504,7 +1504,7 @@ trait Typers requires Analyzer {
setError(copy.Apply(tree, fun, args))
/* --- begin unapply --- */
- case otpe if definitions.unapplyMember(otpe).exists && settings.Xunapply.value =>
+ case otpe if (mode & PATTERNmode) != 0 && definitions.unapplyMember(otpe).exists =>
// !!! this is fragile, maybe needs to be revised when unapply patterns become terms
val unapp = definitions.unapplyMember(otpe)
assert(unapp.exists, tree)