-
Notifications
You must be signed in to change notification settings - Fork 460
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 allowed features for generic param resolving. #5888
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 all commit messages.
Reviewable status: 0 of 2 files reviewed, 2 unresolved discussions (waiting on @gilbens-starkware)
a discussion (no related file):
add previously failing test.
crates/cairo-lang-defs/src/ids.rs
line 320 at r1 (raw file):
impl ModuleItemId { pub fn as_syntax_node(&self, db: &dyn DefsGroup) -> SyntaxNode {
could you have just called stable_ptr
from the outside?
a7d3f37
to
11f5ada
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: 0 of 3 files reviewed, 2 unresolved discussions (waiting on @orizi)
a discussion (no related file):
Previously, orizi wrote…
add previously failing test.
Done.
crates/cairo-lang-defs/src/ids.rs
line 320 at r1 (raw file):
Previously, orizi wrote…
could you have just called
stable_ptr
from the outside?
No, just untyped_stable_ptr
and then if we want to convert it to typed one we'll have to do something similar to this.
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: 0 of 3 files reviewed, 2 unresolved discussions (waiting on @gilbens-starkware)
crates/cairo-lang-defs/src/ids.rs
line 320 at r1 (raw file):
Previously, gilbens-starkware (Gil Ben-Shachar) wrote…
No, just
untyped_stable_ptr
and then if we want to convert it to typed one we'll have to do something similar to this.
but you don't need it type now - do you?
crates/cairo-lang-semantic/src/diagnostic_test_data/tests
line 592 at r2 (raw file):
error: The name `BadATraitImpl` is defined multiple times. --> lib.cairo:45:6 impl BadATraitImpl<+UnstableTrait> of ATrait;
remove diag
11f5ada
to
53038d6
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: 0 of 3 files reviewed, 2 unresolved discussions (waiting on @orizi)
crates/cairo-lang-defs/src/ids.rs
line 320 at r1 (raw file):
Previously, orizi wrote…
but you don't need it type now - do you?
I do, not all syntax kind implement QueryAttrs
.
crates/cairo-lang-semantic/src/diagnostic_test_data/tests
line 592 at r2 (raw file):
Previously, orizi wrote…
remove diag
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 all commit messages.
Reviewable status: 0 of 3 files reviewed, 3 unresolved discussions (waiting on @gilbens-starkware)
crates/cairo-lang-semantic/src/items/generics.rs
line 296 at r3 (raw file):
resolver.set_allowed_features( &lookup_item, &lookup_item.as_syntax_node(db.upcast()),
and remove all the rest.
also - consider just using this inside the set_allowed_features
function.
but probably not for this PR.
Suggestion:
&lookup_item.untyped_stable_ptr(db.upcast()).lookup(db)
commit-id:36ae2d69
53038d6
to
4649de4
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: 0 of 3 files reviewed, 3 unresolved discussions (waiting on @orizi)
crates/cairo-lang-semantic/src/items/generics.rs
line 296 at r3 (raw file):
Previously, orizi wrote…
and remove all the rest.
also - consider just using this inside the
set_allowed_features
function.
but probably not for this PR.
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 1 files at r3, 2 of 2 files at r4, all commit messages.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @gilbens-starkware)
Stack:
This change is![Reviewable](https://camo.githubusercontent.com/23b05f5fb48215c989e92cc44cf6512512d083132bd3daf689867c8d9d386888/68747470733a2f2f72657669657761626c652e696f2f7265766965775f627574746f6e2e737667)