Recognize untagged payloads only by annotations and builtin types
Why
With the stdlib annotated, the classifier's list of stdlib type names only matched types that happen to be printed like a stdlib type, and its name-based dict check took any type named dict for an object.
The list, matched before and after expansion, is gone, and so is the dict check: a payload is recognized by its @instanceOf or @typeOf, or by the builtin type it expands to. Generated code is unchanged for the stdlib's types.
addedDiagnostic a local type named dict
type dict<'a>@unboxed type t = D(dict<int>) | S(string)
js
if (typeof v === "object") { return "D"; } else { return "S"; }diagnostic
This untagged variant definition is invalid: Case D has a payload that is not of one of the recognized shapes (object, array, etc). Then it must be the only case with payloads.