expand implement methods fix availability for new Runnable()<caret> (IDEA-74043 )

This commit is contained in:
anna
2011-10-07 13:13:30 +02:00
parent 0a9507dcdc
commit 9188075b91
7 changed files with 127 additions and 21 deletions

View File

@@ -1,9 +1,9 @@
// instantiate abstract
public class a {
void f() {
new <error descr="'ii' is abstract; cannot be instantiated">ii</error>();
<error descr="'ii' is abstract; cannot be instantiated">new ii()</error>;
new <error descr="'c1' is abstract; cannot be instantiated">c1</error>();
<error descr="'c1' is abstract; cannot be instantiated">new c1()</error>;
new <error descr="Class 'Anonymous class derived from c1' must either be declared abstract or implement abstract method 'f1(int)' in 'c1'">c1</error>() {
public void f2() {}

View File

@@ -0,0 +1,9 @@
// "Implement Methods" "true"
class c {
void foo() {
new I<String>()<caret>
}
}
interface I<T> {
foo(T t);
}

View File

@@ -0,0 +1,6 @@
// "Implement Methods" "true"
class c {
void foo() {
new Runnable()<caret>
}
}