Skip to content

Referring to comptime let values in non-comptime code results in ICE #7550

Closed
@TomAFrench

Description

@TomAFrench

I would expect that I would be able to reference a comptime let value in non-comptime code as below.

fn main() {
    comptime let comptime_bool: bool = true;

    assert(comptime_bool)
}

Compiling this program fails with the result

$ nargo compile
error: ICE: Variable not found during monomorphization
  ┌─ src/main.nr:4:12
  │
4 │     assert(comptime_bool)
  │            -------------
  │
  = Call stack:
    1. src/main.nr:4:12

Aborting due to 1 previous error

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingcompiler

Type

No type

Projects

Status

✅ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions