Skip to content

Fix more complex type specs - #2

Closed
apiology wants to merge 4 commits into
masterfrom
fix_more_complex_type_specs
Closed

Fix more complex type specs#2
apiology wants to merge 4 commits into
masterfrom
fix_more_complex_type_specs

Conversation

@apiology

Copy link
Copy Markdown
Owner

No description provided.

* Consolidate the code that generates substrings to a single place
* Clean up more paths to pass through 'rooted' flag unchanged
* [breaking] Drop special-case interpretation of, e.g., `Array<(String)>` as
  'one element tuple' for future consistency with
  https://yardoc.org/types

  * (String) is a one element tuple in https://yardoc.org/types
  * <String> is an array of zero or more Strings in https://yardoc.org/types
  * Array<(String)> could be an Array of one-element tuples or a
    one element tuple.  https://yardoc.org/types treats it
    as the former.
  * Array<(String), Integer> is not ambiguous if we accept
    (String) as a tuple type, but not currently understood
    by Solargraph.
@apiology apiology closed this Mar 26, 2025
apiology added a commit that referenced this pull request Aug 6, 2026
Found while verifying the intersection method-call-resolution fix
(342b11b) did not regress real union semantics: loose_unions:
false should deny a call when only one member of a plain two-class
union defines it, but does not. The existing strict-mode spec only
covers this rule via nil-stripping (nullable?/without_nil), never
the general two-real-class case. Confirmed pre-existing - reproduces
identically on unmodified HEAD, before 342b11b.

Filed as its own GitHub issue for discussion:
castwide#1270 covers a
different, unrelated bug found along the way (Chain#nullable? nil
leak); this union bug is tracked via task #2 for a pre-merge
discussion, not yet filed separately.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TZme4n9mb8hGU8mrw94NAV
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant