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 @@ -278,6 +278,7 @@ object JavaParsers {
278
278
}
279
279
280
280
def typ (): Tree =
281
+ annotations()
281
282
optArrayBrackets {
282
283
if (in.token == FINAL ) in.nextToken()
283
284
if (in.token == IDENTIFIER ) {
@@ -516,6 +517,7 @@ object JavaParsers {
516
517
517
518
def typeParam (flags : FlagSet ): TypeDef =
518
519
atSpan(in.offset) {
520
+ annotations()
519
521
val name = identForType()
520
522
val hi = if (in.token == EXTENDS ) { in.nextToken() ; bound() } else javaLangObject()
521
523
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