Skip to content

Fixing union subtype axiom#197

Merged
marcoeilers merged 3 commits into
masterfrom
fix_196
Jun 13, 2024
Merged

Fixing union subtype axiom#197
marcoeilers merged 3 commits into
masterfrom
fix_196

Conversation

@marcoeilers

@marcoeilers marcoeilers commented Jun 13, 2024

Copy link
Copy Markdown
Owner

Turns out it's not true for all types T1, T2, T3 that T1 <: Union[T2, T3] iff T1 <: T2 or T1 <: T3. If T1 is itself a union type it's not necessary that the entire union T1 is a subtype of either T2 or T3, this just has to be true for all of its components.

Also, we add the assumption that no object's actual runtime type is a union type.

This fixes #196.


This change is Reviewable

@marcoeilers
marcoeilers merged commit 83b204d into master Jun 13, 2024
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.

Unsoundness involving union types

1 participant