Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change prefix:<+> to dispatch to .Numeric for all types which descend…
… from Mu. Define Mu.Numeric to return 0, Cool.Numeric to call the pir function to convert to a Num. Still need to define Numeric.Numeric.
- Loading branch information
Showing
4 changed files
with
19 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
augment class Cool { | ||
method Numeric() { | ||
pir::set__NP(self); | ||
} | ||
|
||
method abs() { | ||
(+self).abs; | ||
} | ||
|
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