mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-15 22:32:19 +03:00
9970c66417
I don't know how complete this is, but it certainly detects some of the most obvious cases which are most likely to be bugs. While I'm at it, this is as good a time as any to add a general way of reporting warnings, similar to the way of reporting errors.
6 lines
114 B
Idris
6 lines
114 B
Idris
foo : Maybe Int -> Bool -> Int
|
|
foo Nothing _ = 42
|
|
foo Nothing True = 94
|
|
foo (Just x) _ = x
|
|
foo Nothing False = 42
|