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.
This commit is contained in:
1 parent
184cb7b321
commit
1495650587
18 files changed
+244
-4
No files matched your search
@@ -0,0 +1,11 @@
|
||||
// expect: run
|
||||
// result: 42
|
||||
// phase: 6
|
||||
// spec: docs/spec/15-source-language.md §5
|
||||
module test.field_len
|
||||
struct Buffer { len: [u64; 2] }
|
||||
fn main() -> u64 effects [] {
|
||||
let b = Buffer { len: [40u64, 2u64] };
|
||||
assert(b.len.len == 2usize);
|
||||
return b.len[0] + b.len[1];
|
||||
}
|
||||
Reference in new issue
Block a user