framework/tests/all-systems/Issue1865.java
raw| 1 | // Test case for Issue 1865: |
| 2 | // https://github.com/typetools/checker-framework/issues/1865 |
| 3 | |
| 4 | abstract class Issue1865 { |
| 5 | |
| 6 | // Widening conversion |
| 7 | |
| 8 | abstract int f(); |
| 9 | |
| 10 | abstract int max(int... array); |
| 11 | |
| 12 | void g() { |
| 13 | long l = max(f(), f()); |
| 14 | } |
| 15 | |
| 16 | // String conversion |
| 17 | |
| 18 | abstract Object h(Object... args); |
| 19 | |
| 20 | void i() { |
| 21 | Object o = "" + h(); |
| 22 | } |
| 23 | } |