1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
/// A 2D shape. sum Shape { variant Rectangle; variant Triangle; field width: Int32; } struct Rectangle { field width: Int32; field height: Int32; } struct Triangle { field width: Int32; field height: Int32; }