Fixed a bug with JavaDoc checking in class/instance initialisers.
This commit is contained in:
parent
8d6fa332a9
commit
cb0fdf5428
|
|
@ -360,11 +360,11 @@ field!
|
|||
)
|
||||
|
||||
// "static { ... }" class initializer
|
||||
| "static" s3:compoundStatement
|
||||
| "static" {ver.reportStartMethodBlock();} s3:compoundStatement {ver.reportEndMethodBlock();}
|
||||
{#field = #(#[STATIC_INIT,"STATIC_INIT"], s3);}
|
||||
|
||||
// "{ ... }" instance initializer
|
||||
| s4:compoundStatement
|
||||
| {ver.reportStartMethodBlock();} s4:compoundStatement {ver.reportEndMethodBlock();}
|
||||
{#field = #(#[INSTANCE_INIT,"INSTANCE_INIT"], s4);}
|
||||
;
|
||||
|
||||
|
|
|
|||
|
|
@ -90,5 +90,16 @@ class InputTags
|
|||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Test static initialiser
|
||||
static
|
||||
{
|
||||
int x = 1; // should not require any javadoc
|
||||
}
|
||||
|
||||
// test initialiser
|
||||
{
|
||||
int z = 2; // should not require any javadoc
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue