diff options
author | Martin Odersky <odersky@gmail.com> | 2007-04-13 14:22:57 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2007-04-13 14:22:57 +0000 |
commit | 3d9d369b7147f3933cce9932d2914f68d39418c3 (patch) | |
tree | b69be12ed61deb944d1b9cf6b68bf685c9e09878 /src/compiler/scala/tools/nsc/ast/parser/Parsers.scala | |
parent | d08a0445c11684b4d401c21355d5dad9e1b0768d (diff) | |
download | scala-3d9d369b7147f3933cce9932d2914f68d39418c3.tar.gz scala-3d9d369b7147f3933cce9932d2914f68d39418c3.tar.bz2 scala-3d9d369b7147f3933cce9932d2914f68d39418c3.zip |
refactored typer.
Diffstat (limited to 'src/compiler/scala/tools/nsc/ast/parser/Parsers.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/ast/parser/Parsers.scala | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala b/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala index f17c660918..aba8527f3b 100644 --- a/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala +++ b/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala @@ -2071,7 +2071,7 @@ trait Parsers requires SyntaxAnalyzer { template(mods hasFlag Flags.TRAIT) } else { newLineOptWhenFollowedBy(LBRACE) - val (self, body) = templateBodyOpt(mods hasFlag Flags.TRAIT) + val (self, body) = templateBodyOpt(false) (List(), List(List()), self, body) } var parents = parents0 @@ -2091,13 +2091,13 @@ trait Parsers requires SyntaxAnalyzer { if (stats.isEmpty) (self, List(EmptyTree)) else result } - def templateBodyOpt(isTrait: boolean): (ValDef, List[Tree]) = { + def templateBodyOpt(traitParentSeen: boolean): (ValDef, List[Tree]) = { newLineOptWhenFollowedBy(LBRACE) if (in.token == LBRACE) { templateBody() } else { if (in.token == LPAREN) - syntaxError((if (isTrait) "parents of traits" else "mixins")+ + syntaxError((if (traitParentSeen) "parents of traits" else "traits")+ " may not have parameters", true) (emptyValDef, List()) } |