Temporarily add test.bolt
This commit is contained in:
parent
5e7b344e49
commit
87717b7156
1 changed files with 20 additions and 0 deletions
20
test.bolt
Normal file
20
test.bolt
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
|
||||||
|
struct int;
|
||||||
|
|
||||||
|
impl int {
|
||||||
|
|
||||||
|
fn fac(self) -> int {
|
||||||
|
return match n {
|
||||||
|
0 => 1,
|
||||||
|
_ => n * fac(n-1),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// This is wrong
|
||||||
|
fac();
|
||||||
|
|
||||||
|
// This is also wrong
|
||||||
|
fac("FOO");
|
||||||
|
|
Loading…
Reference in a new issue