-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Fix for reverted PR #103880 #105958
Closed
Closed
Fix for reverted PR #103880 #105958
Changes from 1 commit
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i fear that this may only make the bug harder to trigger rather than actually fixing it.
You could imagine having a field like
(subtype, opaque)
to(supertype, opaque)
which hits both the old and the new check.What is the exact reason that we get an ICE there? Is the issue subtyping in
OpaqueCast
or something else?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hm I'm not sure, the comment above
l.109
statesOnly add the OpaqueCast projection if the given place is an opaque type and the expected type from the pattern is not.
I don't know howOpaqueCast
s are handled later or why we need them (they're only used for opaque types, aren't they?). Would we really need anOpaqueCast
only because of thesubtype/suptype
here?I think the ICE is triggered because the type in the
OpaqueCast
is still generic in codegen and we therefore cannot get a layout for it.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah
(subtype, opaque)
to(supertype, opaque)
doesn't trigger this with your fix.still worried about
(subtype, opaque)
to(supertype, concrete)
.This doesn't make sense to me.
OpaqueCast
should never be generic during codegen. We should substitute the concrete generic arguments during codegen if theOpaqueCast
projection still exist there. An alternative might be that we're missing a normalization for the opaque cast but that also seems weird 🤔