framework/tests/all-systems/Issue689.java
raw| 1 | // Test case for issue 689 |
| 2 | // https://github.com/typetools/checker-framework/issues/689 |
| 3 | public class Issue689 { |
| 4 | |
| 5 | public int initializerFodder() { |
| 6 | return 3; |
| 7 | } |
| 8 | |
| 9 | public Runnable trigger() { |
| 10 | return new Runnable() { |
| 11 | // Issue 689 triggers when examining a method invocation inside a field initializer of |
| 12 | // an anonymous inner class |
| 13 | public final int val = initializerFodder(); |
| 14 | |
| 15 | public void run() { |
| 16 | // do nothing |
| 17 | } |
| 18 | }; |
| 19 | } |
| 20 | } |