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.
12 lines
243 B
Rust
12 lines
243 B
Rust
// expect: run
|
|
// result: 42
|
|
// phase: 6
|
|
// spec: docs/spec/15-source-language.md §5
|
|
module test.field_len
|
|
struct Header { len: u32 }
|
|
fn main() -> u32 effects [] {
|
|
let h = Header { len: 41u32 };
|
|
let one = 1;
|
|
return one + h.len;
|
|
}
|