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:
Alan Jeffrey 2022-10-18 16:54:01 -05:00 committed by GitHub
parent b80aac3db2
commit 2d71b68acf
Signed by: DevComp
GPG key ID: 4AEE18F83AFDEB23

View file

@ -161,7 +161,7 @@ type Triangle = Line
& ((Blue) -> (Color) -> (Blue) -> false)
```
Now, `Triangle` is a subtype of `Uncolorable`, but `Line is not`, since the line can be 2-colored.
Now, `Triangle` is a subtype of `Uncolorable`, but `Line` is not, since the line can be 2-colored.
This can be generalized to any finite graph with any finite number of colors, and so subtype checking is NP-hard.
We deal with this in two ways: