File tree 2 files changed +9
-1
lines changed
src/dotty/tools/dotc/parsing 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -3469,7 +3469,11 @@ object Parsers {
3469
3469
givenDef(start, mods, atSpan(in.skipToken()) { Mod .Given () })
3470
3470
case _ =>
3471
3471
syntaxErrorOrIncomplete(ExpectedStartOfTopLevelDefinition ())
3472
- EmptyTree
3472
+ mods.annotations match {
3473
+ case head :: Nil => head
3474
+ case Nil => EmptyTree
3475
+ case all => Block (all, errorTermTree)
3476
+ }
3473
3477
}
3474
3478
3475
3479
/** ClassDef ::= id ClassConstr TemplateOpt
Original file line number Diff line number Diff line change @@ -138,4 +138,8 @@ class TabcompleteTests extends ReplTest {
138
138
tabComplete(" import quoted.* ; def fooImpl(using Quotes): Expr[Int] = { import quotes.reflect.* ; TypeRepr.of[Int].s" ))
139
139
}
140
140
141
+ @ Test def i13624 = fromInitialState { implicit s =>
142
+ assertEquals(List (" implicitNotFound" ), tabComplete(" @annotation.implicitNot" ))
143
+ assertEquals(List (" main" ), tabComplete(" @annotation.implicitNotFound @mai" ))
144
+ }
141
145
}
You can’t perform that action at this time.
0 commit comments