Skip to content

Add ivar support to flow sensitive typing - #1128

Closed
apiology wants to merge 873 commits into
castwide:masterfrom
apiology:union_type_enforcement_ivars
Closed

apiology wants to merge 873 commits into
castwide:masterfrom
apiology:union_type_enforcement_ivars

Conversation

@apiology

@apiology apiology commented Nov 27, 2025 •

Copy link
Copy Markdown
Contributor

Adds support for doing flow-sensitive typing in instance variables, not just local variables.

Note: This approach assumes single-threaded use for type-checking purposes - it's possible to be clever and subvert it, but as a way to reduce false positives in nil-checking, it seems very effective.

To see the actual diff in advance of merging the below, check out apiology#19

Builds on:

Use our generated RBS signature from parameters as a key to combine
method signatures from RBS/YARD pins.

This is closer to what RBS does than the current technique of using
the arity alone, and fixes a key degenerate case in Integer#+ revealed
by updated definitions used by recently released RBS gems
@apiology

apiology commented Mar 2, 2026

Copy link
Copy Markdown
Contributor Author

Merged into v0.59 release branch

@apiology apiology closed this Mar 2, 2026
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.

2 participants