-
Notifications
You must be signed in to change notification settings - Fork 358
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
interp: fix short-form type assertions
The long-form (with comma-ok) ones were already fixed but the short-form ones were not because they were in a completely different code path. This PR also refactors the code so that both short-form and long-form are now merged in the same function. N.B: even though most (all?) cases seem to now be supported, one of them still yields a result that does not satisfy reflect's Implements method yet. It does not prevent the resulting assertion to be usable though. N.B2: the code path for the third-form (_, ok) hasn't been fixed and/or refactored yet. Fixes #919
- Loading branch information
Showing
3 changed files
with
150 additions
and
96 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