Idris2/tests/idris2/reg022/case.idr
Edwin Brady 252e07833b Fix case trees at multiplicity zero
Can't ignore a constructor a multiplicity zero if the whole function is
multiplicity zero
2020-06-06 20:45:20 +01:00

6 lines
227 B
Idris

-- Previously this gave an 'unreachable case warning' and evaluated
-- to the first case! Should give foo : Nat -> Nat
foo : (x : Nat) -> case S x of
Z => Nat -> Nat
(S k) => Nat