Skip to content

Commit d21002f

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

File tree

1 file changed

+16
-12
lines changed

1 file changed

+16
-12
lines changed

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

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1433,30 +1433,34 @@ trait Checking {
14331433
tree match
14341434
case _ if tree.isType =>
14351435
super.transform(tree)
1436-
case _: ( Literal
1437-
| Ident
1438-
| This
1439-
| New
1436+
case _: ( Ident
14401437
| Select
1438+
| This
1439+
| Super
14411440
| Apply
14421441
| TypeApply
1443-
| SeqLiteral
1442+
| Literal
1443+
| New
14441444
| Typed
1445+
| NamedArg
1446+
| Assign
14451447
| Block
1446-
| ValDef
1447-
| DefDef
1448+
| If
14481449
| Closure
1449-
| NamedArg
1450-
| EmptyTree.type
1450+
| Return
1451+
| SeqLiteral
1452+
| Inlined
1453+
| Quote
14511454
| Splice
1452-
| Hole
1453-
| Inlined) =>
1455+
| ValDef
1456+
| DefDef
1457+
| Annotated) =>
14541458
super.transform(tree)
14551459
case _ =>
14561460
errorTree(
14571461
EmptyTree,
14581462
em"""Implementation restriction: this tree cannot be used in an annotation.
1459-
|Tree: ${tree}
1463+
|Tree: ${tree.toString()}
14601464
|Type: ${tree.tpe}""",
14611465
tree.srcPos
14621466
)

0 commit comments

Comments
 (0)