mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-03 07:20:55 +07:00
lambda: initial is assignable check; effectively final; acceptable context
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
interface I {
|
||||
int m();
|
||||
}
|
||||
|
||||
class XXX {
|
||||
|
||||
int var;
|
||||
static int ourVar;
|
||||
|
||||
|
||||
static void foo() {
|
||||
I s = () -> <error descr="Non-static field 'var' cannot be referenced from a static context">var</error> + ourVar;
|
||||
}
|
||||
|
||||
void bar() {
|
||||
I s = ()->var + ourVar;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user