✓
Passing Passing: the compiler rejects this program as expected.
Code
// PINS: a lifted host struct decl takes each field name once. The
// `module/path:Type` field makes the structured parse own the field list —
// a second `x` reaches Zig as `duplicate struct member name 'x'`, host
// noise naming a symbol the author never wrote.
const std = @import("std");
pub const Pair = struct {
x: i32,
x: i64,
link: std/compiler:Item,
};
~tor start {}
~proc start|zig {}
~start()
Actual compiler output
error[PARSE010]: field 'x' is bound twice in host struct 'Pair' — a field list takes each name once
--> tests/regression/200_COMPILER_FEATURES/220_COMPILATION/220_058_host_struct_field_bound_twice_refused/input.kz:9:5
|
9 | x: i64,
| ^Frontend must reject with:
CONTAINS error[PARSE010]
CONTAINS bound twice
ERROR_AT 9
NOT_CONTAINS output_emitted.zigTest Configuration
MUST_ERROR