diff options
author | Jon Pretty <jon.pretty@propensive.com> | 2017-02-09 14:34:06 -0200 |
---|---|---|
committer | Jon Pretty <jon.pretty@propensive.com> | 2017-02-09 14:34:06 -0200 |
commit | 9d26d601443bd7e33fc8fa4b480928dbe5ef6472 (patch) | |
tree | 062a36acf5dfad11248a2a15adde616c3144181a /src/compiler/scala/tools | |
parent | 14521835ff9aed7caab0ffce21120e30af0104fa (diff) | |
download | scala-9d26d601443bd7e33fc8fa4b480928dbe5ef6472.tar.gz scala-9d26d601443bd7e33fc8fa4b480928dbe5ef6472.tar.bz2 scala-9d26d601443bd7e33fc8fa4b480928dbe5ef6472.zip |
Correct the AbstractVar error message
The error currently reads "only classes can have declared but undefined
members", which isn't true on two counts: traits can have them, and
concrete classes cannot. This corrects the error message to read "only
traits and abstract classes can have declared but undefined members".
Diffstat (limited to 'src/compiler/scala/tools')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala | 2 |
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 2d8d591b6d..0910dca445 100644 --- a/src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala +++ b/src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala @@ -1211,7 +1211,7 @@ trait ContextErrors { "pass-by-name arguments not allowed for case class parameters" case AbstractVar => - "only classes can have declared but undefined members" + abstractVarMessage(sym) + "only traits and abstract classes can have declared but undefined members" + abstractVarMessage(sym) } issueSymbolTypeError(sym, msg) |