summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/Typers.scala
diff options
context:
space:
mode:
authorHubert Plociniczak <hubert.plociniczak@epfl.ch>2010-11-02 00:14:43 +0000
committerHubert Plociniczak <hubert.plociniczak@epfl.ch>2010-11-02 00:14:43 +0000
commitf4e000f7f08086727cec4c810873379de8ab2624 (patch)
tree13b34595dc6162b91a19754446b201577866326e /src/compiler/scala/tools/nsc/typechecker/Typers.scala
parent278ec47fb14f58b82e78f4c77b49d35eec122b92 (diff)
downloadscala-f4e000f7f08086727cec4c810873379de8ab2624.tar.gz
scala-f4e000f7f08086727cec4c810873379de8ab2624.tar.bz2
scala-f4e000f7f08086727cec4c810873379de8ab2624.zip
Closes #3816. Review by moors.
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Typers.scala')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Typers.scala5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
index 58f0532e39..e0e8efb007 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
@@ -3623,10 +3623,11 @@ trait Typers { self: Analyzer =>
// are made to disappear here. In addition,
// if we are in a constructor of a pattern, we ignore all definitions
// which are methods (note: if we don't do that
- // case x :: xs in class List would return the :: method).
+ // 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 = {
reallyExists(sym) &&
- ((mode & PATTERNmode | FUNmode) != (PATTERNmode | FUNmode) || !sym.isSourceMethod)
+ ((mode & PATTERNmode | FUNmode) != (PATTERNmode | FUNmode) || !sym.isSourceMethod || sym.hasFlag(ACCESSOR))
}
if (defSym == NoSymbol) {