namespace; include rt; // a switch on a tagged enum that leaves out a member, with no default, warns enum shape { circle { int r; }, rect { int w; int h; }, dot }; fn name(shape* s) { switch (s) { case circle(r): return 1; case dot: return 2; } return 0; } fn main() { shape* a = shape.rect(2, 2); rt.put_n(name(a)); rt.put_c(10); rt.free(d*a); return 0; }