Skip to content

TS Conformance: remaining Fail-bucket clusters (post-#188/#202 survey) #226

Description

@nickna

Part of #80. Survey of the 21 Fail + 4 ParseError tests remaining after PRs #201/#203 and the declare-function/extends fixes (PR pending). Clusters by root cause:

Fixed in the pending PR (tests improved, not yet flipped)

  • declare function never registered (TS2304 extras on 4+ tests)
  • interface B extends A<Base> rejected with TS2312
  • interface I extends SomeClass rejected with TS2312

Remaining clusters

  1. Overload resolution subtype passanyAssignabilityInInheritance (16 extras): foo(a) with a: any must pick the (x: any) overload (tsc's subtype-matching pass runs before the assignability pass; any is not a subtype of number). We pick the first assignable overload → wrong return types cascade into TS2322s.
  2. Parameter defaults referencing earlier parametersgenericCallWithObjectTypeArgsAndInitializers: function foo4<T, U extends T>(x: T, y: U = x) → TS2304 on x; earlier params must be in scope for later defaults (then the expected TS2322s emerge naturally).
  3. Self-referential typeof/initializersassignmentCompatWithObjectMembers: var a: { foo: typeof a } and var a2 = { foo: a2 } → TS2304.
  4. Member accessibility in structural compatassignmentCompatWithObjectMembersAccessibility (16 missing TS2322): private/protected members must make otherwise-identical types incompatible (distinct declarations) in the module-scoped cases.
  5. Index-signature assignability against generic instantiations in generic contextassignmentCompatWith{Numeric,String}Indexer2 remainders (A<T> vs { [x: number]: Derived } inside function foo<T extends Base>()).
  6. Enum assignability detailsenumAssignability (6 missing: enum → number-literal-typed positions?), enumAssignabilityInInheritance (extra TS2322@L81, missing TS2403 var-redecl checks).
  7. Conditional-type evaluationconditionalTypes1/2, conditionalTypesExcessProperties, inferTypesWithExtends2 — deep checker work on conditional/infer evaluation.
  8. ParserinferTypes1/2, inferTypesWithExtends1 (Expect ';' after type alias — likely multiline conditional/infer alias syntax), nullAssignedToUndefined (Invalid assignment target at L1).
  9. Known blocked: covariantCallbacks (always-on callback rule, TS Conformance: structural variance for generic interface instantiations (covariantCallbacks, genericCallSignatures4) #202), unionTypesAssignability (we emit TS2741 where tsc emits TS2322 at the same lines — diagnostic-code choice), assignmentCompatWithDiscriminatedUnion (10 extras — discriminant narrowing in assignability).

Each cluster is independently attackable; (1), (2), and the TS2741→TS2322 code choice in (9) look like the best effort-to-flip ratios.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions