test(tests/compiler): add new test
This commit is contained in:
parent
1bb920322d
commit
d603baea70
2 changed files with 12 additions and 0 deletions
11
tests/compiler/strictOrSimp.lean
Normal file
11
tests/compiler/strictOrSimp.lean
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
partial def spin : Nat → Bool
|
||||
| n := spin (n)
|
||||
|
||||
@[inline] def C : Nat := 0
|
||||
|
||||
def f (b : Nat) :=
|
||||
if strictOr (C == 0) (spin b) then "hello"
|
||||
else "world"
|
||||
|
||||
def main (xs : List String) : IO Unit :=
|
||||
IO.println (f xs.head.toNat)
|
||||
1
tests/compiler/strictOrSimp.lean.expected.out
Normal file
1
tests/compiler/strictOrSimp.lean.expected.out
Normal file
|
|
@ -0,0 +1 @@
|
|||
hello
|
||||
Loading…
Add table
Reference in a new issue