-
Notifications
You must be signed in to change notification settings - Fork 360
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removing the
@OptionalBottom
type and annotation (#6772)
Co-authored-by: Michael Ernst <[email protected]>
- Loading branch information
Showing
5 changed files
with
10 additions
and
104 deletions.
There are no files selected for viewing
20 changes: 0 additions & 20 deletions
20
checker-qual/src/main/java/org/checkerframework/checker/optional/qual/OptionalBottom.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,16 @@ | ||
import java.util.Optional; | ||
import org.checkerframework.checker.optional.qual.MaybePresent; | ||
import org.checkerframework.checker.optional.qual.OptionalBottom; | ||
import org.checkerframework.checker.optional.qual.Present; | ||
|
||
/** Basic test of subtyping. */ | ||
public class SubtypeCheck { | ||
|
||
@SuppressWarnings("optional.parameter") | ||
void foo( | ||
@MaybePresent Optional<String> mp, | ||
@Present Optional<String> p, | ||
@OptionalBottom Optional<String> ob) { | ||
void foo(@MaybePresent Optional<String> mp, @Present Optional<String> p) { | ||
@MaybePresent Optional<String> mp2 = mp; | ||
@MaybePresent Optional<String> mp3 = p; | ||
@MaybePresent Optional<String> mp4 = ob; | ||
// :: error: (assignment) | ||
@Present Optional<String> p2 = mp; | ||
@Present Optional<String> p3 = p; | ||
@Present Optional<String> p4 = ob; | ||
// :: error: (assignment) | ||
@OptionalBottom Optional<String> ob2 = mp; | ||
// :: error: (assignment) | ||
@OptionalBottom Optional<String> ob3 = p; | ||
@OptionalBottom Optional<String> ob4 = ob; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters