diff options
Diffstat (limited to 'tests/bugs/fieldsOnInterfaces/StringFieldOnInterface.java')
-rw-r--r-- | tests/bugs/fieldsOnInterfaces/StringFieldOnInterface.java | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/bugs/fieldsOnInterfaces/StringFieldOnInterface.java b/tests/bugs/fieldsOnInterfaces/StringFieldOnInterface.java new file mode 100644 index 000000000..5f4a3c528 --- /dev/null +++ b/tests/bugs/fieldsOnInterfaces/StringFieldOnInterface.java @@ -0,0 +1,21 @@ + +import org.aspectj.testing.Tester; + +/** @testcase PR#52107 declare String field on interface */ +public class StringFieldOnInterface implements Runnable { + public static void main(String[] args) { + Tester.expectEvent("length=1"); + new StringFieldOnInterface().blah(); + Tester.checkAllEvents(); + } + public void run() { + } +} + +aspect A { + public String Runnable.name = "a"; + public void Runnable.blah() { + int i = name.length(); + Tester.event("length="+i); + } +}
\ No newline at end of file |