ICE: Illegal token
- Dominant language
- Rust
- Stars
- 1.7k
- Forks
- 218
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 8
Description
This bug is very strange. If I copy the program into another Fe file, it compiles normally. Therefore, it is quite confusing.
```fe
contract C{
pub fn bar(self) -> u256{
let a: u256 = 123
return a
}
}
```
```
fe build test.fe
```
```
Error: ParserError: Illegal token: Identifier-start is not allowed at end of a number.
--> input.yul:11:29:
|
11 | let $ret := 3$C$bar()
| ^
Error: ParserError: Expected keyword "data" or "object" or "}".
--> input.yul:11:29:
|
11 | let $ret := 3$C$bar()
| ^
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 issue with the shown Fe contract and `fe build test.fe`, then inspect the generated `input.yul` around line 11 and the panic location in `crates/driver/src/lib.rs:356`. Done means the example compiles without the illegal-token errors or the internal compiler error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100