forked from phoedos/pmd
@ -351,4 +351,9 @@ class ParserCornersTest extends BaseJavaTreeDumpTest {
|
||||
void testGithubBug3101UnresolvedTypeParams() {
|
||||
java.parseResource("GitHubBug3101.java");
|
||||
}
|
||||
|
||||
@Test
|
||||
void testGitHubBug3642() {
|
||||
doTest("GitHubBug3642");
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,11 @@
|
||||
/*
|
||||
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
|
||||
*/
|
||||
|
||||
// see https://github.com/pmd/pmd/issues/3642
|
||||
public class GitHubBug3642 {
|
||||
@interface Foo {
|
||||
String v1()[]; // parse error
|
||||
// equivalent to String[] v1();
|
||||
}
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
+- CompilationUnit[@PackageName = ""]
|
||||
+- ClassOrInterfaceDeclaration[@Abstract = false, @Annotation = false, @Anonymous = false, @BinaryName = "GitHubBug3642", @CanonicalName = "GitHubBug3642", @EffectiveVisibility = Visibility.V_PUBLIC, @Enum = false, @Final = false, @Interface = false, @Local = false, @Nested = false, @PackageName = "", @PackagePrivate = false, @Record = false, @RegularClass = true, @RegularInterface = false, @SimpleName = "GitHubBug3642", @TopLevel = true, @Visibility = Visibility.V_PUBLIC]
|
||||
+- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"]
|
||||
+- ClassOrInterfaceBody[@Empty = false, @Size = 1]
|
||||
+- AnnotationTypeDeclaration[@Abstract = true, @Annotation = true, @Anonymous = false, @BinaryName = "GitHubBug3642$Foo", @CanonicalName = "GitHubBug3642.Foo", @EffectiveVisibility = Visibility.V_PACKAGE, @Enum = false, @Final = false, @Interface = true, @Local = false, @Nested = true, @PackageName = "", @Record = false, @RegularClass = false, @RegularInterface = false, @SimpleName = "Foo", @TopLevel = false, @Visibility = Visibility.V_PACKAGE]
|
||||
+- ModifierList[@EffectiveModifiers = "{abstract, static}", @ExplicitModifiers = "{}"]
|
||||
+- AnnotationTypeBody[@Empty = false, @Size = 1]
|
||||
+- MethodDeclaration[@Abstract = true, @Arity = 0, @EffectiveVisibility = Visibility.V_PACKAGE, @Image = "v1", @Name = "v1", @Overridden = false, @Varargs = false, @Visibility = Visibility.V_PUBLIC, @Void = false]
|
||||
+- ModifierList[@EffectiveModifiers = "{public, abstract}", @ExplicitModifiers = "{}"]
|
||||
+- ClassOrInterfaceType[@FullyQualified = false, @SimpleName = "String"]
|
||||
+- FormalParameters[@Empty = true, @Size = 0]
|
||||
+- ArrayDimensions[@Empty = false, @Size = 1]
|
||||
+- ArrayTypeDim[@Varargs = false]
|
Reference in New Issue
Block a user