Skip to content
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

ImplTypeDefId/ImplTypeId distinction #5245

Merged
merged 1 commit into from
Mar 12, 2024
Merged

ImplTypeDefId/ImplTypeId distinction #5245

merged 1 commit into from
Mar 12, 2024

Conversation

yuvalsw
Copy link
Contributor

@yuvalsw yuvalsw commented Mar 12, 2024

This change is Reviewable

@yuvalsw yuvalsw requested a review from orizi March 12, 2024 09:18
@yuvalsw yuvalsw force-pushed the yuval/impl_type_def_id branch from 7d4107a to 119edf6 Compare March 12, 2024 09:22
Copy link
Collaborator

@orizi orizi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 7 of 8 files at r1, all commit messages.
Reviewable status: 7 of 8 files reviewed, 1 unresolved discussion (waiting on @yuvalsw)


crates/cairo-lang-semantic/src/types.rs line 357 at r1 (raw file):

        if let crate::items::imp::ImplId::Concrete(concrete_impl) = impl_id {
            let impl_def_id = concrete_impl.impl_def_id(db);
            assert_eq!(ty.trait_id(db.upcast()), db.impl_def_trait(impl_def_id).unwrap());

Suggestion:

            assert_eq!(Some(ty.trait_id(db.upcast())), db.impl_def_trait(impl_def_id));

@yuvalsw yuvalsw force-pushed the yuval/impl_type_def_id branch from 119edf6 to f4731dc Compare March 12, 2024 11:12
@yuvalsw yuvalsw force-pushed the yuval/impl_type_def_id branch from f4731dc to 7e2c9a0 Compare March 12, 2024 11:12
Copy link
Contributor Author

@yuvalsw yuvalsw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 7 of 8 files reviewed, 1 unresolved discussion (waiting on @orizi)


crates/cairo-lang-semantic/src/types.rs line 357 at r1 (raw file):

        if let crate::items::imp::ImplId::Concrete(concrete_impl) = impl_id {
            let impl_def_id = concrete_impl.impl_def_id(db);
            assert_eq!(ty.trait_id(db.upcast()), db.impl_def_trait(impl_def_id).unwrap());

Done.

@yuvalsw yuvalsw enabled auto-merge March 12, 2024 11:21
Copy link
Collaborator

@orizi orizi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @yuvalsw)

@yuvalsw yuvalsw added this pull request to the merge queue Mar 12, 2024
Merged via the queue into main with commit fdecbee Mar 12, 2024
43 checks passed
@orizi orizi deleted the yuval/impl_type_def_id branch April 17, 2024 16:31
shramee pushed a commit to shramee/cairo that referenced this pull request Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants