diff --git a/issues/0165-parenthesized-nested-optional-malformed.md b/issues/0165-parenthesized-nested-optional-malformed.md index ea179eeb..110637c0 100644 --- a/issues/0165-parenthesized-nested-optional-malformed.md +++ b/issues/0165-parenthesized-nested-optional-malformed.md @@ -14,8 +14,9 @@ > Genuine nested optionals via alias (`Opt :: ?i64; ?Opt`) work and round-trip. > Regressions: `examples/optionals/0911-nested-optional-via-alias.sx`, > `examples/diagnostics/1195-diagnostics-err-parenthesized-optional-tuple.sx`. -> Verified by 3 adversarial reviews. (Adjacent pre-existing bug found + filed: -> 0171 `?any` child not canonicalized.) +> Verified by 3 adversarial reviews. (A review noted `?any` over-rejection; +> that turned out to be a casing non-bug — lowercase `any` is an undefined name, +> the type is `Any`; see 0171, closed NOT-A-BUG.) ## Symptom diff --git a/issues/0171-optional-any-child-not-canonicalized.md b/issues/0171-optional-any-child-not-canonicalized.md index 9d6c3e32..4c261c50 100644 --- a/issues/0171-optional-any-child-not-canonicalized.md +++ b/issues/0171-optional-any-child-not-canonicalized.md @@ -1,5 +1,16 @@ # 0171 — `?any` optional child is a non-canonical `any` TypeId (box-into-any rule misses, value silently discarded) +> **RESOLVED — NOT A BUG (wrong casing in the repro).** The type-erased value +> type is spelled **`Any`** (capital A), not lowercase `any` (specs.md §Types; +> `src/ir/type_resolver.zig`: `if name == "Any" return .any`). Lowercase `any` +> is an UNDEFINED type name that resolves to an empty-struct stub — which is why +> `?any` appeared to "silently discard" / mis-resolve. The real `Any` optional +> child works correctly: `?Any` round-trips — `x : ?Any = 42` tests present, a +> `null` one tests absent, and `x!` unwraps. There is no `Any`-TypeId +> canonicalization bug. (The confusing diagnostic for a lowercase `?any` — +> "payload type is 'any'" instead of "unknown type 'any'" — is a minor +> undefined-name-in-optional-child message-quality nit, not this issue.) + ## Symptom An optional whose child is `any` (`?any`) is broken. Baseline (before the issue