File tree 4 files changed +23
-0
lines changed
compiler/src/dotty/tools/dotc/parsing
4 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -277,6 +277,7 @@ object JavaParsers {
277
277
}
278
278
279
279
def typ (): Tree =
280
+ annotations()
280
281
optArrayBrackets {
281
282
if (in.token == FINAL ) in.nextToken()
282
283
if (in.token == IDENTIFIER ) {
@@ -515,6 +516,7 @@ object JavaParsers {
515
516
516
517
def typeParam (flags : FlagSet ): TypeDef =
517
518
atSpan(in.offset) {
519
+ annotations()
518
520
val name = identForType()
519
521
val hi = if (in.token == EXTENDS ) { in.nextToken() ; bound() } else javaLangObject()
520
522
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