You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ cat I3.java
import org.checkerframework.checker.nullness.qual.Nullable;
final class I2 extends Z {
@Nullable String s;
I2() {
use(() -> init());
use(
new Runnable() {
@Override
public void run() {
init();
}
});
}
void init() {}
}
class Z {
void use(Runnable r) {}
}
$ checker/bin/javac -processor nullness I3.java
I3.java:7: error: [method.invocation.invalid] call to use(java.lang.Runnable) not allowed on the given receiver.
use(() -> init());
^
found : @UnderInitialization(Z.class) Z
required: @Initialized Z
I3.java:8: error: [method.invocation.invalid] call to use(java.lang.Runnable) not allowed on the given receiver.
use(
^
found : @UnderInitialization(Z.class) Z
required: @Initialized Z
2 errors
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: