Skip to content

[ICE] assert causes compiler crash #1136

@Subway2023

Description

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions