Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
First cut of enforcing return types of subs and methods. Both of Foo …
…and returns Foo forms work - also did some more general infrastructure for trait verbs on routines to make this work. Limitation in this patch is it only works for explicit calls to return, not yet implicit returns by falling off the end of the sub. .of and .returns on a Sub also work as a result of this, since it's done by having the Callable[::T] role holding the return type. Because when we get the current Sub using interpinfo we end up with the Parrot-level sub rather than our reblessed one, need to maintain a reference on that to the re-blessed one that carries the type info. Hopefully we can drop that in the future, somehow.
- Loading branch information
Showing
3 changed files
with
109 additions
and
10 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