// Map support boundaries at lowering. Keep accepted adjacent forms here // as well so widening the value domain removes its old diagnostic. // Boolean keys compile alongside the remaining value and method fences. const byFlag = new Map(); // Values exclude functions (no closure story in the uniform value slot yet). const handlers = new Map void>(); // Typed nested Maps retain their identity and are supported. const nested = new Map>(); // Boolean-keyed parameter slots share the supported key domain. function useFlags(m: Map): number { return m.size; } // Nullable Map views are supported; no diagnostic should appear here. function maybeMap(cond: boolean): Map | undefined { return undefined; } // Maps as array elements now preserve references without a diagnostic. const rows: Map[] = []; // Maps are not JSON (Node stringifies them as the useless "{}" husk; // scriptc rejects instead of shipping that). const m = new Map(); console.log(JSON.stringify(m)); // Map methods have no bound-value form — call them directly. const getter = m.get; // Reached: collection defers its diagnostics until a reference makes // them relevant; these references are what makes them count. useFlags(new Map()); maybeMap(true);