Skip to content

Commit a7bd23b

Browse files
committed
Allow Quote and If
1 parent 5d668e6 commit a7bd23b

File tree

1 file changed

+16
-11
lines changed

1 file changed

+16
-11
lines changed

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

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1433,30 +1433,35 @@ trait Checking {
14331433
tree match
14341434
case _ if tree.isType =>
14351435
super.transform(tree)
1436-
case _: ( Literal
1436+
case _: ( EmptyTree.type
14371437
| Ident
1438-
| This
1439-
| New
14401438
| Select
1439+
| This
1440+
| Super
14411441
| Apply
14421442
| TypeApply
1443-
| SeqLiteral
1443+
| Literal
1444+
| New
14441445
| Typed
1446+
| NamedArg
1447+
| Assign
14451448
| Block
1446-
| ValDef
1447-
| DefDef
1449+
| If
14481450
| Closure
1449-
| NamedArg
1450-
| EmptyTree.type
1451+
| Return
1452+
| SeqLiteral
1453+
| Inlined
1454+
| Quote
14511455
| Splice
1452-
| Hole
1453-
| Inlined) =>
1456+
| ValDef
1457+
| DefDef
1458+
| Annotated) =>
14541459
super.transform(tree)
14551460
case _ =>
14561461
errorTree(
14571462
EmptyTree,
14581463
em"""Implementation restriction: this tree cannot be used in an annotation.
1459-
|Tree: ${tree}
1464+
|Tree: ${tree.toString()}
14601465
|Type: ${tree.tpe}""",
14611466
tree.srcPos
14621467
)

0 commit comments

Comments
 (0)