Skip to content

Confusing error message when using non-const tx_field_id in __gtf #7564

@ironcev

Description

@ironcev

E.g:

let x = 0xA;
let _ = __gtf::<raw_ptr>(0, x);
                            ^ Could not evaluate initializer to a const declaration.

We should provide a clear error message explaining that tx_field_id must be a u64 constant.

Metadata

Metadata

Assignees

Labels

compilerGeneral compiler. Should eventually become more specific as the issue is triagedcompiler: irIRgen and sway-ir including optimization passescompiler: uiMostly compiler messages

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions