-
Notifications
You must be signed in to change notification settings - Fork 110
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: generate __is-aware code for
is
on unions
This expands an `is` applied to a union (even in behind an alias) into a chain of `or` tests with individual `is` checks on the types of the union. If the individual entries have __is metamethods, expands their code as well. This implementation is not recursive (i.e. it does not handle unions of unions), but it is a major improvement over the previous behavior. Fixes #742.
- Loading branch information
Showing
3 changed files
with
198 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters