diff options
author | Paul Phillips <paulp@improving.org> | 2010-02-28 16:52:03 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2010-02-28 16:52:03 +0000 |
commit | 9bfc0f0ac615b48b39b696dc1fb61ba07e5e8274 (patch) | |
tree | fab4096e043c7a1468e239924cc70314819f05b5 /src/compiler/scala/tools/nsc/typechecker/Typers.scala | |
parent | ba5dbbd44db2c23c7532cde13453c6a031afb6e5 (diff) | |
download | scala-9bfc0f0ac615b48b39b696dc1fb61ba07e5e8274.tar.gz scala-9bfc0f0ac615b48b39b696dc1fb61ba07e5e8274.tar.bz2 scala-9bfc0f0ac615b48b39b696dc1fb61ba07e5e8274.zip |
Modification to r21009 to preserve that classic...
Modification to r21009 to preserve that classic invariant, (x || !x) &&
!(x && !x). No review.
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Typers.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Typers.scala | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala index 98ee29c32b..04cbc6f5d2 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala @@ -648,9 +648,9 @@ trait Typers { self: Analyzer => if (tree.tpe.isError) tree else if ((mode & (PATTERNmode | FUNmode)) == PATTERNmode && tree.isTerm) { // (1) - if (sym.isNotAValue) errorTree(tree, sym+" is not a value") - else checkStable(tree) - } else if ((mode & (EXPRmode | QUALmode)) == EXPRmode && sym.isNotAValue && !phase.erasedTypes) { // (2) + if (sym.isValue) checkStable(tree) + else errorTree(tree, sym+" is not a value") + } else if ((mode & (EXPRmode | QUALmode)) == EXPRmode && !sym.isValue && !phase.erasedTypes) { // (2) errorTree(tree, sym+" is not a value") } else { if (sym.isStable && pre.isStable && tree.tpe.typeSymbol != ByNameParamClass && |