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

no snapshot peeling from type_enriched_members key. #7229

Merged
merged 1 commit into from
Feb 9, 2025

Conversation

ilyalesokhin-starkware
Copy link
Contributor

No description provided.

@reviewable-StarkWare
Copy link

This change is Reviewable

@ilyalesokhin-starkware
Copy link
Contributor Author

crates/cairo-lang-semantic/src/diagnostic_test_data/deref line 206 at r1 (raw file):

//! > function_body

//! > expected_diagnostics

Before the fix.

because it assumed @s3 has the same deref as S3.

Suggestion:

//! > expected_diagnostics
error: Unexpected argument type. Expected: "test::S3", found: "@test::S3".
 --> lib.cairo:46:6
    (@s3).a;
     ^^^

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 all commit messages.
Reviewable status: 0 of 2 files reviewed, 1 unresolved discussion (waiting on @gilbens-starkware and @ilyalesokhin-starkware)


crates/cairo-lang-semantic/src/expr/compute.rs line 3073 at r1 (raw file):

            ctx.resolver.inference().solve().ok();
            ctx.resolver.inference().internal_rewrite(&mut long_ty).no_err();
            let members =

shouldn't the key be rewritten as well?

Code quote:

            let (_, mut long_ty) = peel_snapshots(ctx.db, expr.ty());
            // Save some work. ignore the result. The error, if any, will be reported later.
            ctx.resolver.inference().solve().ok();
            ctx.resolver.inference().internal_rewrite(&mut long_ty).no_err();
            let members =

@ilyalesokhin-starkware
Copy link
Contributor Author

crates/cairo-lang-semantic/src/expr/compute.rs line 3073 at r1 (raw file):

Previously, orizi wrote…

shouldn't the key be rewritten as well?

I don't now if you are more likely to look for the original key or the rewritten key.

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 1 of 2 files at r1.
Reviewable status: 1 of 2 files reviewed, 1 unresolved discussion (waiting on @gilbens-starkware and @ilyalesokhin-starkware)


crates/cairo-lang-semantic/src/expr/compute.rs line 3073 at r1 (raw file):

Previously, ilyalesokhin-starkware wrote…

I don't now if you are more likely to look for the original key or the rewritten key.

probably the rewritten - as you'd probably have the most "solved" possible value for this lookup.

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 1 of 2 files at r1.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @gilbens-starkware and @ilyalesokhin-starkware)

Copy link
Contributor Author

@ilyalesokhin-starkware ilyalesokhin-starkware 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: 1 of 2 files reviewed, 1 unresolved discussion (waiting on @gilbens-starkware and @orizi)


crates/cairo-lang-semantic/src/expr/compute.rs line 3073 at r1 (raw file):

Previously, orizi wrote…

probably the rewritten - as you'd probably have the most "solved" possible value for this lookup.

Done.

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 2 of 2 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @gilbens-starkware)

Copy link
Contributor

@gilbens-starkware gilbens-starkware 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 2 of 2 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @ilyalesokhin-starkware)

Copy link
Contributor Author

@ilyalesokhin-starkware ilyalesokhin-starkware left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 2 files at r2, 3 of 3 files at r3, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @ilyalesokhin-starkware)

@ilyalesokhin-starkware ilyalesokhin-starkware added this pull request to the merge queue Feb 9, 2025
Merged via the queue into main with commit 1e91f01 Feb 9, 2025
48 checks passed
@ilyalesokhin-starkware ilyalesokhin-starkware deleted the ilya/enriched_key branch February 9, 2025 10:35
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.

4 participants