summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-05-06 16:34:10 +0000
committerPaul Phillips <paulp@improving.org>2011-05-06 16:34:10 +0000
commit9654d5149166464987b7f8aa6c6d2cae8cbb3ae6 (patch)
treebc6c03fe867588087e28144c9fe13a976748fdab /src
parenta6d0d9dd0de962147b184b39c2169c2d47673cd8 (diff)
downloadscala-9654d5149166464987b7f8aa6c6d2cae8cbb3ae6.tar.gz
scala-9654d5149166464987b7f8aa6c6d2cae8cbb3ae6.tar.bz2
scala-9654d5149166464987b7f8aa6c6d2cae8cbb3ae6.zip
Tightened a condition to avoid a self-referenti...
Tightened a condition to avoid a self-referential pattern variable crash. Closes #3392, no review.
Diffstat (limited to 'src')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Typers.scala1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
index b35a23ed50..59cb6c4081 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
@@ -3652,6 +3652,7 @@ trait Typers extends Modes {
// case x :: xs in class List would return the :: method)
// unless they are stable or are accessors (the latter exception is for better error messages).
def qualifies(sym: Symbol): Boolean = {
+ sym.hasRawInfo && // this condition avoids crashing on self-referential pattern variables
reallyExists(sym) &&
((mode & PATTERNmode | FUNmode) != (PATTERNmode | FUNmode) || !sym.isSourceMethod || sym.hasFlag(ACCESSOR))
}