19 lines
265 B
Plaintext
19 lines
265 B
Plaintext
|
|
// ok.hako — no duplicate methods (overloading by arity is OK)
|
||
|
|
|
||
|
|
static box Calculator {
|
||
|
|
method add(a, b) {
|
||
|
|
return a + b
|
||
|
|
}
|
||
|
|
|
||
|
|
method add(a, b, c) {
|
||
|
|
return a + b + c
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
static box Main {
|
||
|
|
method main() {
|
||
|
|
Calculator.add(1, 2)
|
||
|
|
return 0
|
||
|
|
}
|
||
|
|
}
|