Commit fbdebd30 authored by gzayas's avatar gzayas Committed by Joachim Breitner

supress warning of bang wildcard pattern-binding (i.e. let !_ = rhs). This fixes #9127

parent e577a523
......@@ -476,8 +476,9 @@ rnBind _ bind@(PatBind { pat_lhs = pat
bndrs = collectPatBinders pat
bind' = bind { pat_rhs = grhss', bind_fvs = fvs' }
is_wild_pat = case pat of
L _ (WildPat {}) -> True
_ -> False
L _ (WildPat {}) -> True
L _ (BangPat (L _ (WildPat {}))) -> True -- #9127
_ -> False
-- Warn if the pattern binds no variables, except for the
-- entirely-explicit idiom _ = rhs
......
{-# LANGUAGE BangPatterns #-}
module T9127 where
f = let !_ = 2 * 2
in 2*2
......@@ -214,3 +214,4 @@ test('T7969',
'T7969.imports'])],
run_command,
['$MAKE -s --no-print-directory T7969'])
test('T9127', normal, compile, [''])
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment