Relevant Bindings no longer reports shadowed bindings (fixes #12176)
[ghc.git] / testsuite / tests / typecheck / should_fail / T6078.hs
1 {-# LANGUAGE BangPatterns #-}
2 module T6078 where
3
4 import GHC.Ptr
5 import Foreign
6
7 byteStringSlice len = \fpbuf ip0 ipe s0 ->
8 let ip1p@(Ptr ip1) = Ptr ip0 `plusPtr` len
9 -- Note that the panic goes away if we use a bang-pattern as follows
10 -- let !ip1p@(Ptr ip1) = Ptr ip0 `plusPtr` len
11 in ip1p