Skip to content

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

Description

@samlich

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions