File tree 1 file changed +7
-10
lines changed
docs/docs/reference/other-new-features
1 file changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -52,8 +52,8 @@ quotation.
52
52
53
53
Quotes and splices can also be applied directly to identifiers. An identifier
54
54
` $x ` starting with a ` $ ` that appears inside a quoted expression or type is treated as a
55
- splice ` ${x} ` . Analogously, an identifier 'x will be treated in the future as a quote ` '{x} ` .
56
- See the Syntax section below for details.
55
+ splice ` ${x} ` . Analogously, an quoted identifier 'x that appears inside a splice
56
+ is treated as a quote ` '{x} ` . See the Syntax section below for details.
57
57
58
58
Quotes and splices are duals of each other. For arbitrary
59
59
expressions ` e ` and types ` T ` we have:
@@ -608,18 +608,15 @@ Compared to the [Dotty reference grammar](../../internals/syntax.md)
608
608
there are the following syntax changes:
609
609
610
610
SimpleExpr ::= ...
611
- | ‘'’ BlockExpr
611
+ | ‘'’ ‘{’ Block ‘}’
612
612
| ‘'’ ‘[’ Type ‘]’
613
- | ‘$’ BlockExpr
613
+ | ‘$’ ‘{’ Block ‘}’
614
614
SimpleType ::= ...
615
- | ‘$’ BlockExpr
615
+ | ‘$’ ‘{’ Block ‘}’
616
616
617
617
In addition, an identifier ` $x ` starting with a ` $ ` that appears inside
618
- a quoted expression or type is treated as a splice ` ${x} ` .
619
-
620
- In the future, an analogous rule will apply to quoted identifiers. I.e. ` 'x `
621
- will expand everywhere to ` '{x} ` . However, we need to wait one language version with this
622
- so that the competing legacy syntax of symbol literals can be phased out safely.
618
+ a quoted expression or type is treated as a splice ` ${x} ` and a quoted identifier
619
+ ` 'x ` that appears inside a splice is treated as a quote ` '{x} `
623
620
624
621
### Implementation in ` dotc `
625
622
You can’t perform that action at this time.
0 commit comments