Skip to content
  • Ben Gamari's avatar
    RnExpr: Actually fail if patterns found in expression · bce99086
    Ben Gamari authored and Ben Gamari's avatar Ben Gamari committed
    This fixes #12584, where wildcard patterns were snuck into an
    expression, which then crashed the typechecker in TcExpr since EWildPats
    aren't supposed to appear in the AST after renaming.
    
    The problem was that `rnTopSpliceDecl` failed to check for errors from
    `rnSplice` (as done by other callers to `rnSplice`).
    
    Thanks to Shayan for reporting this!
    
    Reviewers: simonpj, austin
    
    Reviewed By: simonpj
    
    Subscribers: simonpj, thomie
    
    Differential Revision: https://phabricator.haskell.org/D2539
    
    GHC Trac Issues: #12584
    bce99086