Infer map literal types

This commit is contained in:
sergeych committed 2026-02-05 20:31:20 +03:00
1 parent de9ac14e33
commit 7a286f2e06
4 files changed
+152 -1

No files matched your search

+1
View File
@@ -268,6 +268,7 @@ Normalize unions by removing duplicates and collapsing nullability (e.g. `Int|In
Map inference:
- `{ "a": 1, "b": 2 }` is `Map<String,Int>`.
- `{ "a": 1, "b": "x" }` is `Map<String,Int|String>`.
- Empty map literal uses `{:}` (since `{}` is empty callable).
- `extern class Map<K=String,V=Object>` so `Map()` is `Map<String,Object>()` unless contextual type overrides.