forked from ponylang/ponyc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Forbid impossible pattern matching on generic capabilities (ponylang#…
…2499) This changes the capability rules for pattern matching from "some possible instantiation of the operand is a subtype of some possible instantation of the pattern" to "every possible instantiation of the operand is a subtype of every possible instantiation of the pattern". In practice this makes the compiler issue an error when a pattern can only ever match for some reification of the generic capability. Code that uses this kind of pattern matching should now use `iftype` instead. This doesn't fix any safety issues.
- Loading branch information
Showing
4 changed files
with
84 additions
and
185 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
Oops, something went wrong.