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
for method references instead of method invocations
I see it with 3.39.0-eisop1 and with 3.40.0-eisop2 but not with 3.40.0-eisop2, so I assume that it's part of the general initialization-checker restructuring.
$ cat I2.java
import org.checkerframework.checker.nullness.qual.Nullable;
final class I2 {
@Nullable String s;
I2() {
use(this::init);
}
void init() {}
static void use(Runnable r) {}
}
$ checker/bin/javac -processor nullness I2.java
I2.java:7: error: [methodref.receiver.bound.invalid] Incompatible receiver type
use(this::init);
^
found : @UnderInitialization I2
required: @Initialized I2
Consequence: method
@UnderInitialization I2
is not a valid method reference for method in @UnderInitialization I2
void init(@Initialized I2 this)
1 error
The text was updated successfully, but these errors were encountered:
This is like #610 but:
@MonotonicNonNull
and@Nullable
[edit: I actually don't remember for sure whether I checked if@MonotonicNonNull
fields now preventfinal
-class constructors from calling a method at the end #610 affected both]I see it with 3.39.0-eisop1 and with 3.40.0-eisop2 but not with 3.40.0-eisop2, so I assume that it's part of the general initialization-checker restructuring.
The text was updated successfully, but these errors were encountered: