Skip to content

assertion overriden by other exceptions

The attached file, containing

main = let e1 i = throw Overflow
       in assert False (e1 5)

and compiled with

ghc --make -O1 -fno-ignore-asserts test.hs

produces

test: arithmetic overflow

and should produce

test: test.hs:25:11-16: Assertion failed

Works OK, if compiled with

ghc --make -O0 test.hs
Trac metadata
Trac field Value
Version 7.3
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information