Skip to content

Commit 3ea2841

Browse files
committed
Brackets -> Braces
1 parent f03d0a3 commit 3ea2841

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

compiler/src/dotty/tools/dotc/ast/untpd.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ object untpd extends Trees.Instance[Untyped] with UntypedTreeInfo {
104104
case class Throw(expr: Tree)(implicit @constructorOnly src: SourceFile) extends TermTree
105105
case class Quote(quoted: Tree)(implicit @constructorOnly src: SourceFile) extends TermTree
106106
case class Splice(expr: Tree)(implicit @constructorOnly src: SourceFile) extends TermTree {
107-
def isInBrackets: Boolean = span.end != expr.span.end
107+
def isInBraces: Boolean = span.end != expr.span.end
108108
}
109109
case class TypSplice(expr: Tree)(implicit @constructorOnly src: SourceFile) extends TypTree
110110
case class ForYield(enums: List[Tree], expr: Tree)(implicit @constructorOnly src: SourceFile) extends TermTree

compiler/src/dotty/tools/dotc/typer/QuotesAndSplices.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ trait QuotesAndSplices {
122122
if !isFullyDefined(pt, ForceDegree.flipBottom) then
123123
ctx.error(i"Type must be fully defined.", splice.sourcePos)
124124
tree.withType(UnspecifiedErrorType)
125-
else if splice.isInBrackets then // ${x}(...) match an application
125+
else if splice.isInBraces then // ${x}(...) match an application
126126
val typedArgs = args.map(arg => typedExpr(arg))
127127
val argTypes = typedArgs.map(_.tpe.widenTermRefExpr)
128128
val splice1 = typedSplice(splice, defn.FunctionOf(argTypes, pt))

docs/docs/reference/metaprogramming/macros.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -787,7 +787,7 @@ eval { // expands to the code: (16: Int)
787787
```
788788

789789
We can also close over several bindings using `$b(a1, a2, ..., an)`.
790-
To match an actual application we can use brackets on the function part `${b}(a1, a2, ..., an)`.
790+
To match an actual application we can use braces on the function part `${b}(a1, a2, ..., an)`.
791791

792792

793793
### More details

0 commit comments

Comments
 (0)