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 @@ -369,8 +369,8 @@ object JavaParsers {
369
369
def annotation (): Option [Tree ] = {
370
370
def classOrId (): Tree =
371
371
val id = qualId()
372
- if in.lookaheadToken == CLASS then
373
- in.nextToken( )
372
+ if in.token == DOT && in. lookaheadToken == CLASS then
373
+ accept( DOT )
374
374
accept(CLASS )
375
375
TypeApply (
376
376
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