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

Bug: Thread 'main' panicked at method_application.rs: called Option::unwrap() on a None value #6060

Closed
Nazeeh21 opened this issue May 27, 2024 · 1 comment · Fixed by #6201
Assignees
Labels
bug Something isn't working compiler: frontend Everything to do with type checking, control flow analysis, and everything between parsing and IRgen

Comments

@Nazeeh21
Copy link
Member

A Bug has been found in the compiler

thread 'main' panicked at sway-core/src/semantic_analysis/ast_node/expression/typed_expression/method_application.rs:127:26:

called `Option::unwrap()` on a `None` value

note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

This can be removed by changing all .values to .into()s. Doesn’t apply to the newer versions of the compiler since it forces you to write into()s, but worth pointing out.

The above code was compilable under v0.49.3 and below (basically, you could access the .value field in the structs which is private now and not allowed under the newer versions.

You can find the forum post here

@esdrubal esdrubal self-assigned this May 27, 2024
@esdrubal esdrubal added compiler: frontend Everything to do with type checking, control flow analysis, and everything between parsing and IRgen bug Something isn't working labels May 27, 2024
@Nazeeh21
Copy link
Member Author

Is there any updates on this? This is a blocker for one of our grantee

esdrubal added a commit that referenced this issue Jul 1, 2024
This commit replaces an unwarp that was in previous version of std lib
throwing out a panic because the base value was None.

Fixes #6060
@IGI-111 IGI-111 closed this as completed in 65dbd34 Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working compiler: frontend Everything to do with type checking, control flow analysis, and everything between parsing and IRgen
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants