summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala
diff options
context:
space:
mode:
authorDenys Shabalin <denys.shabalin@typesafe.com>2014-02-25 13:03:41 +0100
committerDenys Shabalin <denys.shabalin@typesafe.com>2014-02-28 11:41:49 +0100
commit6ec0f2f44f74657799b4b215c913a67089110061 (patch)
tree3f88e1504ddbefd6dd939f98e4d3fe58774be4e2 /src/compiler/scala/tools/nsc/ast/parser/Parsers.scala
parent13e7b8112fb412bb3ed29716409087aed0f2a7e4 (diff)
downloadscala-6ec0f2f44f74657799b4b215c913a67089110061.tar.gz
scala-6ec0f2f44f74657799b4b215c913a67089110061.tar.bz2
scala-6ec0f2f44f74657799b4b215c913a67089110061.zip
SI-8333 can't use modifiers if class is in a block
Was caused by the ordering of parser cases. Need to check for definition first due to the fact that modifiers unquote looks like identifier from parser point of view.
Diffstat (limited to 'src/compiler/scala/tools/nsc/ast/parser/Parsers.scala')
-rw-r--r--src/compiler/scala/tools/nsc/ast/parser/Parsers.scala8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala b/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala
index 3542fe5945..9e631febee 100644
--- a/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala
+++ b/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala
@@ -3096,10 +3096,6 @@ self =>
stats ++= importClause()
acceptStatSepOpt()
}
- else if (isExprIntro) {
- stats += statement(InBlock)
- if (!isCaseDefEnd) acceptStatSep()
- }
else if (isDefIntro || isLocalModifier || isAnnotation) {
if (in.token == IMPLICIT) {
val start = in.skipToken()
@@ -3110,6 +3106,10 @@ self =>
}
acceptStatSepOpt()
}
+ else if (isExprIntro) {
+ stats += statement(InBlock)
+ if (!isCaseDefEnd) acceptStatSep()
+ }
else if (isStatSep) {
in.nextToken()
}