mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-92588 (check for AutoCloseable on interface extraction)
This commit is contained in:
@@ -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; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user