summaryrefslogtreecommitdiff
path: root/testsuite/tests/overloadedrecflds/should_fail/hasfieldfail01.hs
blob: d949074ab5b7e4ba44d321fa2851d87bb92aa94e (plain)
1
2
3
4
5
6
7
8
9
{-# LANGUAGE DataKinds, MagicHash, TypeFamilies, TypeApplications #-}

import HasFieldFail01_A (T(MkT))

import GHC.Records (HasField(..))

-- This should fail to solve the HasField constraint, because foo is
-- not in scope.
main = print (getField @"foo" (MkT 42) :: Int)