-
Notifications
You must be signed in to change notification settings - Fork 440
Dyno: fixes to make sync tests resolve
#28150
New issue
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
Merged
Merged
Conversation
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
Signed-off-by: Danila Fedorin <[email protected]>
Signed-off-by: Danila Fedorin <[email protected]>
Signed-off-by: Danila Fedorin <[email protected]>
Signed-off-by: Danila Fedorin <[email protected]>
Signed-off-by: Danila Fedorin <[email protected]>
Signed-off-by: Danila Fedorin <[email protected]>
Signed-off-by: Danila Fedorin <[email protected]>
4892f7b to
6668ec7
Compare
Signed-off-by: Danila Fedorin <[email protected]>
Signed-off-by: Danila Fedorin <[email protected]>
This ought to produce a warning about implicit `readFF`, but I haven't yet figured out where that warning should go. Signed-off-by: Danila Fedorin <[email protected]>
For this case, I fortunately know where to emit the warning. Signed-off-by: Danila Fedorin <[email protected]>
Signed-off-by: Danila Fedorin <[email protected]>
Signed-off-by: Danila Fedorin <[email protected]>
d1dd882 to
f1377b2
Compare
Signed-off-by: Danila Fedorin <[email protected]>
arifthpe
requested changes
Jan 6, 2026
Signed-off-by: Danila Fedorin <[email protected]>
Signed-off-by: Danila Fedorin <[email protected]>
Signed-off-by: Danila Fedorin <[email protected]>
arifthpe
approved these changes
Jan 6, 2026
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.
This PR fixes some
synctests which were failing for various reasons.A couple of the tests were failing because an
enumwas namede. It turns out our logic for compiler-generating enumeration types ends up creating the following:In this case, the declaration for the formal
ewas picked up in the type expression, and we ended up with a use-before-def. In production, I'd resolve this by creating a directSymExprto refer to theenumtype instead of the formal; in Dyno, lacking the ability to short-circuit scope resolution in this way, I simply rename the formal toe_in this case.Some tests were failing because copying out of a
syncproduced asyncinstead of implicitly performing a read. In this PR, I used Ben'sinfer copy typepragma Allow for inferring custom type #22308 to customize the behavior here, enabling the reads. However, in production, this produces a warning, so...I implemented the "implicit sync reads is deprecated" warning. Last time I tried getting rid of the implicit sync reads (since they are past their deprecation duration), I found them to be load bearing, so I chose this approach instead. This required some changes...
ConversionKind(forcanPass) into a bitfield. This way, we don't have to separately encodeborrowsandborrows subtype(borrowing is now a flag), and I can encode an additional type of conversion kind: reading a sync. Thus, we may pass async owned Childto aborrowed Parentby borrowing, reading, and applying a subtyping conversion.ref: storing the conversions in theMostSpecificCandidate. This is required (as opposed to issuing the warning fromcanPassdirectly, say) to avoid spurious warnings where a conversion would take a place if a different candidate was selected, but where that candidate was rejected for a different reason.This is the net result. I consider it an IOU to decide when to issue the warning for implicitly reading from a sync into a variable (as opposed to a formal), but that is IMO secondary to getting
synctypes behaving as expected.Reviewed by @arifthpe -- thanks!
Testing
--dyno-resolve-only