Idris-dev icon indicating copy to clipboard operation
Idris-dev copied to clipboard

Compiler accepts DivBy with impossible

Open Riateche opened this issue 5 years ago • 1 comments

div_by_crash.idr.zip

Steps to Reproduce

import Data.Primitives.Views

total
bad: Int -> Int
bad x with (divides x 2)
  bad (_ + _) | (DivBy _) impossible

Expected Behavior

This should be a valid case. The function should not be considered total.

Observed Behavior

The compiler accepts this as a total function. It crashes at run time.

Riateche avatar Jun 02 '20 17:06 Riateche

Can I get any confirmation or update on this?

Riateche avatar Jul 13 '20 17:07 Riateche