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