SIGN IN SIGN UP

Fix null/array guards dropped for untagged variant switch in statement position

When a switch on an untagged variant (e.g. JSON.t) with an Object case was in
statement position (not tail), compile_general_cases would set default=None for
empty default bodies, causing the null/array guard to be silently skipped. This
let null and arrays fall into the typeof "object" branch at runtime.

Two fixes:
- Handle the Some guard, None default case by emitting if (!(guard)) { ... }
- Use the type's block_cases to determine if arrays can appear at runtime,
  avoiding unnecessary Array.isArray guards for types without an Array case

Fixes #8251 (comment)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
C
Cristiano Calcagno committed
ccdec51fcc7642a3bc913ef0b3172d9935e44b54
Parent: 11bbd58