File tree Expand file tree Collapse file tree 4 files changed +23
-0
lines changed
compiler/src/dotty/tools/dotc/parsing Expand file tree Collapse file tree 4 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -277,6 +277,7 @@ object JavaParsers {
277277 }
278278
279279 def typ (): Tree =
280+ annotations()
280281 optArrayBrackets {
281282 if (in.token == FINAL ) in.nextToken()
282283 if (in.token == IDENTIFIER ) {
@@ -515,6 +516,7 @@ object JavaParsers {
515516
516517 def typeParam (flags : FlagSet ): TypeDef =
517518 atSpan(in.offset) {
519+ annotations()
518520 val name = identForType()
519521 val hi = if (in.token == EXTENDS ) { in.nextToken() ; bound() } else javaLangObject()
520522 TypeDef (name, TypeBoundsTree (EmptyTree , hi)).withMods(Modifiers (flags))
Original file line number Diff line number Diff line change 1+ package i11490 ;
2+
3+ import java .lang .annotation .*;
4+
5+ @ Retention (RetentionPolicy .RUNTIME )
6+ @ Target ({ ElementType .TYPE_USE , ElementType .TYPE_PARAMETER })
7+ public @interface First {}
Original file line number Diff line number Diff line change 1+ package i11490 ;
2+
3+ import java .lang .annotation .*;
4+
5+ @ Retention (RetentionPolicy .RUNTIME )
6+ @ Target ({ ElementType .TYPE_USE , ElementType .TYPE_PARAMETER })
7+ public @interface Second {}
Original file line number Diff line number Diff line change 1+ package i11490 ;
2+
3+ import java .util .List ;
4+
5+ public class Use <@ First T extends @ Second List <@ First @ Second String >> {
6+ public <@ First S > @ Second @ First String method (@ Second int a , @ First @ Second S b ) { return "" ; }
7+ }
You can’t perform that action at this time.
0 commit comments