File tree 4 files changed +22
-2
lines changed
compiler/src/dotty/tools/dotc/parsing
4 files changed +22
-2
lines changed Original file line number Diff line number Diff line change @@ -363,8 +363,8 @@ object JavaParsers {
363
363
def annotation (): Option [Tree ] = {
364
364
def classOrId (): Tree =
365
365
val id = qualId()
366
- if in.lookaheadToken == CLASS then
367
- in.nextToken( )
366
+ if in.token == DOT && in. lookaheadToken == CLASS then
367
+ accept( DOT )
368
368
accept(CLASS )
369
369
TypeApply (
370
370
Select (
Original file line number Diff line number Diff line change
1
+ package p ;
2
+
3
+ @ TestInstance (TestInstance .Lifecycle .PER_CLASS )
4
+ class J { }
Original file line number Diff line number Diff line change
1
+ class S
Original file line number Diff line number Diff line change
1
+ package p ;
2
+
3
+ import java .lang .annotation .ElementType ;
4
+ import java .lang .annotation .Inherited ;
5
+ import java .lang .annotation .Retention ;
6
+ import java .lang .annotation .RetentionPolicy ;
7
+ import java .lang .annotation .Target ;
8
+
9
+ @ Target (ElementType .TYPE )
10
+ @ Retention (RetentionPolicy .RUNTIME )
11
+ @ Inherited
12
+ public @interface TestInstance {
13
+ enum Lifecycle { PER_CLASS , PER_METHOD ; }
14
+ Lifecycle value ();
15
+ }
You can’t perform that action at this time.
0 commit comments