The acceptance table runs unions.flan at -O2, at -O0 and as a dev build. -O0 because a union value is built in an alloca and mem2reg is exactly what would hide a store to the wrong half of it; dev because every body goes behind an indirection cell there and a union crosses one both as a parameter and as a return value. The layout goes through the oracle the DWARF section already had: LLVM's own answer for the emitted type, read back as a folded ptrtoint. Two unions, one whose widest case is a pair of f64 and one whose cases are all i32, so the payload size and alignment are not constants the test could have agreed with by accident. Eleven refusals, each by name. The first is the diagnostics bug NEXT.md listed: a case name written as if it were a struct said "unknown struct A", because nothing in the environment could tell a case from a misspelling. Non-exhaustive matches are refused rather than defaulted. A match that fell through would have to produce a value of the match's type out of nothing, and the case a union grows tomorrow is the one a reader wants to be told about today; _ is how to say "the rest", written where it can be seen. A case pattern binds all of a case's fields or none, positionally: binding some of them reads the wrong field the moment one is inserted above it. test_flan's 'match works on an Option at milestone 2' assertion moved with the message, which no longer blames a milestone that has arrived.
Description
Languages
OCaml
67.2%
Emacs Lisp
15.2%
C
10.4%
HTML
2.9%
Standard ML
2.8%
Other
1.5%