diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/ajcTestsFailing.xml | 9 | ||||
-rw-r--r-- | tests/bugs/invalidAbsoluteTypeName/False_InvalidAbsoluteTypeName.java | 24 |
2 files changed, 33 insertions, 0 deletions
diff --git a/tests/ajcTestsFailing.xml b/tests/ajcTestsFailing.xml index c2493c0d4..244fe7bb8 100644 --- a/tests/ajcTestsFailing.xml +++ b/tests/ajcTestsFailing.xml @@ -133,5 +133,14 @@ <run class="InterfaceInitializerOrder"/> </ajc-test> + <ajc-test + dir="bugs/invalidAbsoluteTypeName" + pr="65925" + title="Valid but inaccessible type names should not be flagged by XLint:invalidAbsoluteTypeName"> + <compile files="False_InvalidAbsoluteTypeName.java"> + <message kind="warning" line="17"/> + </compile> + <run class="False_InvalidAbsoluteTypeName"/> + </ajc-test> </suite> diff --git a/tests/bugs/invalidAbsoluteTypeName/False_InvalidAbsoluteTypeName.java b/tests/bugs/invalidAbsoluteTypeName/False_InvalidAbsoluteTypeName.java new file mode 100644 index 000000000..5c97a362e --- /dev/null +++ b/tests/bugs/invalidAbsoluteTypeName/False_InvalidAbsoluteTypeName.java @@ -0,0 +1,24 @@ + + +/** @testcase PR#65925 Valid but inaccessible type names should not be flagged by XLint:invalidAbsoluteTypeName */ +public class False_InvalidAbsoluteTypeName { + public static void main(String[] args) { + C.go(); + } +} + +class C { + static void go() { + Nested.method(); + } + + // remove "private" to work around bug + private static class Nested { + static void method() {} // CW 17 per declare + } +} + +aspect A { + // bug: trigger XLint:invalidAbsoluteTypeName b/c not visible, though valid + declare warning : execution(void C.Nested.method()) : "nested method"; +}
\ No newline at end of file |