Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Panic when pattern matching record syntax constructor using wrong parameter #92

Open
samlich opened this issue Feb 15, 2017 · 0 comments

Comments

@samlich
Copy link

samlich commented Feb 15, 2017

The following occurs

[1/1] Compiling Haskell                  Main                   (Test.hs)
ehc: panic: DataFieldPatExpr.Ext.ioffset

when compiling this (C is incorrectly pattern matched with y in the let)

module Main (main) where

data C = C {x :: Int}
data B = B {y :: Int}
main :: IO ()
main = let (C {y=z}) = C {x=5}
       in return ()

Using a symbol that doesn't exist (e.g. C {w=z}) works as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant