mirror of
https://github.com/luau-lang/luau.git
synced 2025-05-04 10:33:46 +01:00
Update docs/_posts/2022-10-31-luau-semantic-subtyping.md
Co-authored-by: Alexander McCord <11488393+alexmccord@users.noreply.github.com>
This commit is contained in:
parent
7b1553d5dc
commit
5a0fc8a946
1 changed files with 1 additions and 1 deletions
|
@ -55,7 +55,7 @@ AKA “what we did before.”
|
|||
|
||||
Syntactic subtyping is a syntax-directed recursive algorithm. The interesting cases to deal with intersection and union types are:
|
||||
|
||||
i* Reflexivity: `T` is a subtype of `T`
|
||||
* Reflexivity: `T` is a subtype of `T`
|
||||
* Intersection L: `(T₁ & … & Tⱼ)` is a subtype of `U` whenever some of the `Tᵢ` are subtypes of `U`
|
||||
* Union L: `(T₁ | … | Tⱼ)` is a subtype of `U` whenever all of the `Tᵢ` are subtypes of `U`
|
||||
* Intersection R: `T` is a subtype of `(U₁ & … & Uⱼ)` whenever `T` is a subtype of some of the `Uᵢ`
|
||||
|
|
Loading…
Add table
Reference in a new issue