You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Untagged variant puts one typed array in another typed array's case #8955
An untagged variant with cases for two typed arrays accepts a value of one typed array in the case of the other, and the value then matches the other case.
The typed-array types are abbreviations of one type, so I8(Uint8Array…) type-checks. The cases are classified by the type name as written, so the run-time check is instanceof Uint8Array.
Expected: either the cases are distinct types, so that I8(Uint8Array…) is a type error, or the variant is rejected because two cases share one type.
The rule is compiler/ml/UntaggedVariants.md rule 5, in #8952. #8950 changes how these types are recognized.
Activity