File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed
src/compiler/scala/tools/nsc/ast/parser Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -425,11 +425,10 @@ trait MarkupParsers {
425
425
if (ch != '/' ) ts append xPattern // child
426
426
else return false // terminate
427
427
428
- case '{' => // embedded Scala patterns
429
- while (ch == '{' ) {
430
- nextch()
428
+ case '{' if xCheckEmbeddedBlock => // embedded Scala patterns, if not double brace
429
+ do {
431
430
ts ++= xScalaPatterns
432
- }
431
+ } while (xCheckEmbeddedBlock)
433
432
assert(! xEmbeddedBlock, " problem with embedded block" )
434
433
435
434
case SU =>
Original file line number Diff line number Diff line change
1
+
2
+ trait Z {
3
+ // extra space made the pattern OK
4
+ def f = <z > {{3 }}</z > match { case <z > {{3 }}</z > => }
5
+
6
+ // lack of space: error: illegal start of simple pattern
7
+ def g = <z >{{3 }}</z > match { case <z >{{3 }}</z > => }
8
+ }
9
+
You can’t perform that action at this time.
0 commit comments