IDEA-92588 (check for AutoCloseable on interface extraction)

This commit is contained in:
Roman Shevchenko
2012-10-10 10:35:51 +02:00
parent 37941c490f
commit 0dc1191c25
10 changed files with 155 additions and 8 deletions
@@ -0,0 +1,15 @@
class Test {
void test() throws Exception {
MyIterable r = new MyIterableImpl();
for (String s : r) {
r.length();
}
}
interface MyIterable extends Iterable<String> {
}
static class MyIterableImpl implements MyIterable {
public Iterator<String> iterator() { return null; }
}
}
@@ -0,0 +1,15 @@
class Test {
void test() throws Exception {
MyIterableImpl r = new MyIterableImpl();
for (String s : r) {
r.length();
}
}
interface MyIterable extends Iterable<String> {
}
static class MyIterableImpl implements MyIterable {
public Iterator<String> iterator() { return null; }
}
}