method refs: static testdata, apply qualifier substitutor

This commit is contained in:
anna
2012-09-27 19:25:40 +02:00
parent b130fcba63
commit ac4a96fc03
5 changed files with 47 additions and 1 deletions

View File

@@ -0,0 +1,17 @@
class MyTest {
interface I {
String m(Foo f);
}
static class Foo<X> {
String foo() { return null; }
Foo<X> getFoo() { return this; }
static void test() {
I i1 = Foo.<error descr="Non-static method 'getFoo()' cannot be referenced from a static context">getFoo</error>()::foo;
I i2 = <error descr="'MyTest.Foo.this' cannot be referenced from a static context">this</error>::foo;
I i3 = Foo :: foo;
}
}
}