-
Notifications
You must be signed in to change notification settings - Fork 490
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
Added indirect impl support for inference. #4420
Conversation
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.
Reviewed 5 of 6 files at r1, all commit messages.
Reviewable status: 5 of 6 files reviewed, 2 unresolved discussions (waiting on @orizi)
crates/cairo-lang-semantic/src/items/impl_alias.rs
line 223 at r1 (raw file):
_impl_alias_id: &ImplAliasId, ) -> Maybe<ImplDefId> { Err(skip_diagnostic())
Explain why it's ok.
tests/bug_samples/lib.cairo
line 2 at r1 (raw file):
mod ecdsa_completeness; mod indirect_impl;
Suggestion:
indirect_impl_alias;
9951f4f
to
d9110d9
Compare
Included small refactor + removal of unneed extra module lookup.
d9110d9
to
032b7fb
Compare
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.
Reviewable status: 4 of 6 files reviewed, 1 unresolved discussion (waiting on @gilbens-starkware)
crates/cairo-lang-semantic/src/items/impl_alias.rs
line 223 at r1 (raw file):
Previously, gilbens-starkware (Gil Ben-Shachar) wrote…
Explain why it's ok.
Done.
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.
Reviewed 1 of 6 files at r1, 4 of 4 files at r2.
Reviewable status: all files reviewed (commit messages unreviewed), 1 unresolved discussion (waiting on @orizi)
crates/cairo-lang-semantic/src/items/imp.rs
line 926 at r2 (raw file):
res.insert(UninferredImpl::GenericParam(*generic_param_id)); } for module_id in chain!(lookup_context.modules.iter().map(|x| &x.0)) {
Shouldn't it be in another pr?
And I guess the prelude module is added to the context somewhere 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.
Reviewed all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @orizi)
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.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @gilbens-starkware)
crates/cairo-lang-semantic/src/items/imp.rs
line 926 at r2 (raw file):
Previously, gilbens-starkware (Gil Ben-Shachar) wrote…
Shouldn't it be in another pr?
And I guess the prelude module is added to the context somewhere else?
it isn't - but in the corelib all impls are either next to the trait or next to the type.
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.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @orizi)
crates/cairo-lang-semantic/src/items/imp.rs
line 926 at r2 (raw file):
Previously, orizi wrote…
it isn't - but in the corelib all impls are either next to the trait or next to the type.
Makes sense.
This change is