Skip to content

Commit

Permalink
Allow Quote and If
Browse files Browse the repository at this point in the history
  • Loading branch information
mbovel committed Nov 22, 2024
1 parent 5d668e6 commit 6cc02f0
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions compiler/src/dotty/tools/dotc/typer/Checking.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1433,30 +1433,36 @@ trait Checking {
tree match
case _ if tree.isType =>
super.transform(tree)
case _: ( Literal
case _: ( EmptyTree.type
| Ident
| This
| New
| Select
| This
| Super
| Apply
| TypeApply
| SeqLiteral
| Literal
| New
| Typed
| NamedArg
| Assign
| Block
| ValDef
| DefDef
| If
| Closure
| NamedArg
| EmptyTree.type
| Return
| SeqLiteral
| Inlined
| Quote
| Splice
| Hole
| Inlined) =>
| ValDef
| DefDef
| Annotated) =>
super.transform(tree)
case _ =>
errorTree(
EmptyTree,
em"""Implementation restriction: this tree cannot be used in an annotation.
|Tree: ${tree}
|Tree: ${tree.toString()}
|Type: ${tree.tpe}""",
tree.srcPos
)
Expand Down

0 comments on commit 6cc02f0

Please sign in to comment.