Skip to content

Conversation

@asukaminato0721
Copy link
Contributor

@asukaminato0721 asukaminato0721 commented Oct 31, 2025

part of #1219.

Added TypeAlias::body_type/runtime_value and used them across the solver so we can keep alias names for printing while still acting on their underlying types when needed (attribute access, class bases, isinstance/issubclass, subset checks). Scoped type aliases still behave as TypeAliasType at runtime; legacy aliases now behave like the types they wrap.

Refined isinstance handling so union aliases (e.g., X = B | C) are accepted as class info, and ensured scoped aliases still error.

Allowed type-alias bases when they’re legacy aliases and kept the explicit error for scoped aliases.

@meta-cla meta-cla bot added the cla signed label Oct 31, 2025
@asukaminato0721 asukaminato0721 marked this pull request as ready for review October 31, 2025 07:23
@yangdanny97
Copy link
Contributor

Can you elaborate on your proposed fix? I don't think this PR addresses the root cause of #1219 - the type aliases are expanded in untype_opt & the information those types came from an alias is lost.

@asukaminato0721 asukaminato0721 marked this pull request as draft October 31, 2025 17:51
@asukaminato0721 asukaminato0721 marked this pull request as ready for review November 9, 2025 19:17
@asukaminato0721 asukaminato0721 marked this pull request as draft November 9, 2025 19:18
@asukaminato0721
Copy link
Contributor Author

image

at least less noisy now.

@asukaminato0721 asukaminato0721 marked this pull request as ready for review November 9, 2025 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants