Typehinting merge #50

Merged
belliash merged 298 commits from typehinting into master 2019-04-17 11:27:52 +02:00
2 changed files with 16 additions and 0 deletions
Showing only changes of commit 6927c5c038 - Show all commits

15
tests/factorial_test.aer Normal file
View File

@ -0,0 +1,15 @@
class Program {
function factorial(int $num) {
if($num == 0 || $num == 1)
return 1;
else
return $num * $this->factorial($num - 1);
}
function main() {
int $num = 7;
print('Factorial of ', $num, ' is ', $this->factorial($num), '.');
}
}

1
tests/factorial_test.exp Normal file
View File

@ -0,0 +1 @@
Factorial of 7 is 5040.