summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@typesafe.com>2015-08-24 18:47:31 -0700
committerAdriaan Moors <adriaan.moors@typesafe.com>2015-09-02 12:04:07 -0700
commitcc70cfb5024729935b5dd9be385847bd43c90b04 (patch)
tree28e860755f2a6c90a9641a5f70b125f5392848f1 /src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala
parent66a316a4acdb2584ef9d85f15b950f12c94d909c (diff)
downloadscala-cc70cfb5024729935b5dd9be385847bd43c90b04.tar.gz
scala-cc70cfb5024729935b5dd9be385847bd43c90b04.tar.bz2
scala-cc70cfb5024729935b5dd9be385847bd43c90b04.zip
Simplify decision whether to derive accessors
Originally (modulo renaming & reduction of double negation in previous commit): ``` def deriveAccessors(vd: ValDef) = vd.mods.isLazy || !( !owner.isClass || (vd.mods.isPrivateLocal && !vd.mods.isCaseAccessor) // this is an error -- now checking first || (vd.name startsWith nme.OUTER) || (context.unit.isJava) // pulled out to caller || isEnumConstant(vd) ) def deriveAccessorTrees(vd: ValDef) = !( (vd.mods.isPrivateLocal && !vd.mods.isLazy) // lazy was pulled out to outer disjunction || vd.symbol.isModuleVar // pulled out to caller || isEnumConstant(vd)) ``` With changes in comments above, these conditions are now captured by one method.
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala b/src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala
index b0bd9977a8..1b2e7f628e 100644
--- a/src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala
@@ -1105,7 +1105,7 @@ trait ContextErrors {
def GetterDefinedTwiceError(getter: Symbol) =
issueSymbolTypeError(getter, getter+" is defined twice")
- def ValOrValWithSetterSuffixError(tree: Tree) =
+ def ValOrVarWithSetterSuffixError(tree: Tree) =
issueNormalTypeError(tree, "Names of vals or vars may not end in `_='")
def PrivateThisCaseClassParameterError(tree: Tree) =