Files
dev 1495650587 cli: resolve struct len fields by receiver type
Use ordinary field lowering and declared field types for nominal receivers while preserving array and slice lengths. Make array field type hints available to chained access. Missing struct len now reports E7002 instead of the builtin-length E7005.

Add 15 source regressions and imported generic CLI checks. Unit tests, all 1201 conformance cases, per-instruction collection for new cases, formatter corpus and original public check/lower compatibility pass.
2026-10-07 20:50:48 +03:00

14 lines
331 B
Rust

// expect: run
// result: 42
// phase: 6
// spec: docs/spec/15-source-language.md §5
module test.field_len
struct Header { len: u32 }
struct Wrapper { len: Header }
fn main() -> u32 effects [] {
var w: Wrapper = Wrapper { len: Header { len: 40u32 } };
w.len.len = w.len.len + 1;
ref r = w;
return r.len.len + 1;
}