panic with RecordWildCards: find_tycon ghc-prim:GHC.Types.[]
The following crashes in 7.4.2, 7.6.3, 7.7:
{-# LANGUAGE RecordWildCards #-}
data R = R {r :: Int}
f x = undefined [] {r = x}
main = return ()
with the message:
~/$ ghc --make tycon_panic.hs
[1 of 1] Compiling Main ( tycon_panic.hs, tycon_panic.o )
ghc: panic! (the 'impossible' happened)
(GHC version 7.4.2 for x86_64-unknown-linux):
find_tycon
ghc-prim:GHC.Types.[]{(w) d 6m}
[]
Instead it should signal a type error (as it does with no RecordWildCards).
Trac metadata
| Trac field | Value |
|---|---|
| Version | 7.6.3 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler (Type checker) |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |