1 parent 689f08c commit e2ccb04Copy full SHA for e2ccb04
1 file changed
docs/manual.md
@@ -913,16 +913,16 @@ Operators are overloaded by an `operator` declaration:
913
```
914
struct Integer {
915
type func new(n) {
916
- alloc(This){
+ return alloc(This){
917
.n = n,
918
};
919
}
920
921
operator %(rhs) {
922
if rhs isa Integer {
923
- Integer.new(this.n % rhs.n);
+ return Integer.new(this.n % rhs.n);
924
} elsif rhs isa Int {
925
- Integer.new(this.n % rhs);
+ return Integer.new(this.n % rhs);
926
} else {
927
throw alloc(Unimplemented);
928
0 commit comments