Open
Conversation
Owner
Author
|
@Maxi17 The latest commit fixes the issue. I tried to add a better testcase to ensure |
|
@PRITI1999 It looks good. Please fix the misc tests by adding documentation to the methods you added in |
Defaulting rules for the primary annotation of an intersection type: 1. One or more of the bounds have an explicit annotation: the default annotation is the first explicit annotation. (I tried making the default the glb of the (explicit or defaulted) annotations on the bounds, but I found this confusing in the case of casts. We can discuss this further.) 2. Zero bounds have an explicit annotation: the default annotation of the location is applied. (So, either explicit upper bound defaults, or for casts, the annotation of the cast expression.) Warning: If any explicit annotation on a bound is not the same as the primary annotation, then a warning is issued. (I was going to put this in a separate pull request, but it needs to be in this one so that the test cases are easier to understand.) Changes to AnnotatedIntersectionType: 1. Adding a primary annotation to an intersection type causes that annotation to be copied to its bounds. This is similar to what happens when an annotation is added to a type variable. 2. New method `getBounds` returns a list of the bounds of the intersection type. (This used to be done via `directSuperTypes` method. 3. The bounds can be any AnnotatedTypeMirror if the intersection arises from capture conversion. Fixes typetools#868; Fixes typetools#3349; Fixes typetools#3362; Fixes typetools#3659.
Co-authored-by: Michael Ernst <mernst@cs.washington.edu>
This removal reduces latency by giving less chance for later jobs to get their first jobs into the queue before this one's last jobs get in the queue.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.