Skip to content

Commit

Permalink
Allow This and Inlined, enable checks for retains annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
mbovel committed Nov 22, 2024
1 parent 872459d commit 5d668e6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions compiler/src/dotty/tools/dotc/typer/Checking.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1424,8 +1424,6 @@ trait Checking {
case _ =>
report.error(em"@${cls.name} needs a string literal as argument", arg.srcPos)
tree
case _ if cls.isRetainsLike =>
tree
case _ =>
checkAnnotTreeMap.transform(tree)

Expand All @@ -1437,6 +1435,7 @@ trait Checking {
super.transform(tree)
case _: ( Literal
| Ident
| This
| New
| Select
| Apply
Expand All @@ -1450,7 +1449,8 @@ trait Checking {
| NamedArg
| EmptyTree.type
| Splice
| Hole) =>
| Hole
| Inlined) =>
super.transform(tree)
case _ =>
errorTree(
Expand Down

0 comments on commit 5d668e6

Please sign in to comment.