inline method: do not check for inaccessibility if referenced member would be also inlined (IDEA-78941 )

This commit is contained in:
anna
2011-12-16 10:01:03 +01:00
parent c8c3007e4a
commit d2bab883bd
4 changed files with 59 additions and 4 deletions

View File

@@ -0,0 +1,24 @@
public class Foo {
public static void f<caret>oo() {
bar(new Runnable() {
@Override
public void run() {
doRun();
}
private void doRun() {
// Woo-hoo
}
});
}
public static void bar(final Runnable runnable) {
runnable.run();
}
}
class Bar {
public static void main(String[] args) {
Foo.foo();
}
}

View File

@@ -0,0 +1,21 @@
public class Foo {
public static void bar(final Runnable runnable) {
runnable.run();
}
}
class Bar {
public static void main(String[] args) {
Foo.bar(new Runnable() {
@Override
public void run() {
doRun();
}
private void doRun() {
// Woo-hoo
}
});
}
}