argotorg / argotorg/fe

[ICE] assert causes compiler crash

Closed
#1,136 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
1.7k
Forks
218
Avg merge
1d 4h
Merged PRs (30d)
8

Description

```fe
contract C {
pub fn f(self, a: bool) -> bool {
let b: bool = a;
let x: bool = b;
assert b == true
return x;
}
}
```
```
fe build test.fe
```
```
Error: ParserError: Literal or identifier expected.
--> input.yul:13:37:
|
13 | let $ret := assert_1-250907121115$C$f($a)
| ^

Error: ParserError: Expected keyword "data" or "object" or "}".
--> input.yul:13:37:
|
13 | let $ret := assert_1-250907121115$C$f($a)
| ^

thread 'main' panicked at crates/driver/src/lib.rs:356:13:
Yul compilation failed with the above errors
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

You've hit an internal compiler error. This is a bug in the Fe compiler.
Fe is still under heavy development, and isn't yet ready for production use.

If you would, please report this bug at the following URL:
https://github.com/ethereum/fe/issues/new
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the crash with the provided contract in test.fe by running `fe build test.fe`. Inspect generated input.yul around line 13 and the failure reported at crates/driver/src/lib.rs:356. Done when this example no longer produces the Yul parser errors or the internal compiler panic.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
blockchain, compilers
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.