We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The following code should type check without any errors.
import java.util.function.Supplier; import org.checkerframework.checker.nullness.qual.NonNull; public final class IssueXXX { enum TestEnum { FIRST, SECOND }; public static void main(String[] args) { TestEnum testEnum = TestEnum.FIRST; Supplier<Integer> supplier = switch (testEnum) { case FIRST: yield () -> 1; case SECOND: yield() -> 2; }; @NonNull Supplier<Integer> supplier1 = supplier; } }
../testcases/src/Issue5930.java:13: error: [assignment] incompatible types in assignment. @NonNull Supplier<Integer> supplier1 = supplier; ^ found : @UnknownInitialization @Nullable Supplier<@Initialized @NonNull Integer> required: @UnknownInitialization @NonNull Supplier<@Initialized @NonNull Integer>
The text was updated successfully, but these errors were encountered:
smillst
Successfully merging a pull request may close this issue.
The following code should type check without any errors.
The text was updated successfully, but these errors were encountered: