const enabled: Bool = meta(target.pointerWidth >= 32 && hasField(Point, "x")) const selected: Mode = Mode.fast const field_count: usize = meta fieldCount(Point) const field_type: String = meta fieldType(Point, "x") const mode_cases: usize = meta enumCaseCount(Mode) const has_tiny: Bool = meta hasEnumCase(Mode, "tiny") const event_cases: usize = meta choiceCaseCount(Event) const has_tick: Bool = meta hasChoiceCase(Event, "tick") type Point { x: i32, y: i32, } type Gate { value: i32, } enum Mode: u8 { fast, tiny, } choice Event { none, tick: i32, } fn readGate(gate: ref>) -> i32 { if enabledFlag { return gate.value } return 0 } pub fn main(world: World) -> Void raises { let gate: Gate = Gate { value: 29 } if readGate(&gate) == 29 && field_count == 2 && mode_cases == 2 && event_cases == 2 && has_tiny && has_tick && std.mem.eql(field_type, "i32") { check world.out.write("compile time v1 ok\n") } }