Skip to content

Commit e2ccb04

Browse files
egranataEnrico Granata
andauthored
Fix up a sample program in the Aria manual (#312)
Part of #310 Co-authored-by: Enrico Granata <egranata@aria>
1 parent 689f08c commit e2ccb04

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

docs/manual.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -913,16 +913,16 @@ Operators are overloaded by an `operator` declaration:
913913
```
914914
struct Integer {
915915
type func new(n) {
916-
alloc(This){
916+
return alloc(This){
917917
.n = n,
918918
};
919919
}
920920
921921
operator %(rhs) {
922922
if rhs isa Integer {
923-
Integer.new(this.n % rhs.n);
923+
return Integer.new(this.n % rhs.n);
924924
} elsif rhs isa Int {
925-
Integer.new(this.n % rhs);
925+
return Integer.new(this.n % rhs);
926926
} else {
927927
throw alloc(Unimplemented);
928928
}

0 commit comments

Comments
 (0)