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 @@ -3472,7 +3472,11 @@ object Parsers {
3472
3472
givenDef(start, mods, atSpan(in.skipToken()) { Mod .Given () })
3473
3473
case _ =>
3474
3474
syntaxErrorOrIncomplete(ExpectedStartOfTopLevelDefinition ())
3475
- EmptyTree
3475
+ mods.annotations match {
3476
+ case head :: Nil => head
3477
+ case Nil => EmptyTree
3478
+ case all => Block (all, errorTermTree)
3479
+ }
3476
3480
}
3477
3481
3478
3482
/** 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