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

Added error for unhandled error types. #4454

Merged
merged 1 commit into from
Nov 23, 2023

Conversation

orizi
Copy link
Collaborator

@orizi orizi commented Nov 22, 2023

Closes #3960.


Stack:

⚠️ Part of a stack created by spr. Do not merge manually using the UI - doing so may have unexpected results.


This change is Reviewable

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.

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


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

                && unwrap_error_propagation_type(ctx.db, ty).is_some()
            {
                ctx.diagnostics.report(&expr_syntax, UnhandledErrorType { ty });

The author talked about a warning, do we really want to error on this?

Copy link
Collaborator Author

@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.

Reviewable status: 7 of 10 files reviewed, 1 unresolved discussion (waiting on @gilbens-starkware)


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

Previously, gilbens-starkware (Gil Ben-Shachar) wrote…

The author talked about a warning, do we really want to error on this?

why not - you can handle it by:
let _ =

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 4 of 10 files at r1.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @orizi)

Closes #3960.

commit-id:e7d01089
@orizi orizi changed the base branch from pr/orizi/map-lowering-diags/08129f84 to main November 23, 2023 08:10
@orizi orizi force-pushed the pr/orizi/map-lowering-diags/e7d01089 branch from 0cb9e51 to 3aae5ec Compare November 23, 2023 08:10
@orizi orizi enabled auto-merge November 23, 2023 08:10
@orizi orizi added this pull request to the merge queue Nov 23, 2023
Merged via the queue into main with commit dfea524 Nov 23, 2023
@orizi orizi deleted the pr/orizi/map-lowering-diags/e7d01089 branch November 26, 2023 11:37
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.

feat: warn for unused return value for specific types
2 participants