diff options
Diffstat (limited to 'testsuite/tests/deriving/should_compile')
-rw-r--r-- | testsuite/tests/deriving/should_compile/T16179.hs | 7 | ||||
-rw-r--r-- | testsuite/tests/deriving/should_compile/T16179.stderr | 5 | ||||
-rw-r--r-- | testsuite/tests/deriving/should_compile/all.T | 1 |
3 files changed, 13 insertions, 0 deletions
diff --git a/testsuite/tests/deriving/should_compile/T16179.hs b/testsuite/tests/deriving/should_compile/T16179.hs new file mode 100644 index 0000000000..5873f8913e --- /dev/null +++ b/testsuite/tests/deriving/should_compile/T16179.hs @@ -0,0 +1,7 @@ +{-# LANGUAGE DeriveAnyClass #-} +{-# LANGUAGE GeneralizedNewtypeDeriving #-} + +module T16179 where + +class C a +newtype T a = MkT a deriving C diff --git a/testsuite/tests/deriving/should_compile/T16179.stderr b/testsuite/tests/deriving/should_compile/T16179.stderr new file mode 100644 index 0000000000..c3815d138f --- /dev/null +++ b/testsuite/tests/deriving/should_compile/T16179.stderr @@ -0,0 +1,5 @@ +T16179.hs:7:30: warning: + Both DeriveAnyClass and GeneralizedNewtypeDeriving are enabled + Defaulting to the DeriveAnyClass strategy for instantiating C + Use DerivingStrategies to pick a different strategy + In the newtype declaration for âTâ diff --git a/testsuite/tests/deriving/should_compile/all.T b/testsuite/tests/deriving/should_compile/all.T index 8c84bcc31a..ef6259df54 100644 --- a/testsuite/tests/deriving/should_compile/all.T +++ b/testsuite/tests/deriving/should_compile/all.T @@ -114,3 +114,4 @@ test('T15290c', normal, compile, ['']) test('T15290d', normal, compile, ['']) test('T15398', normal, compile, ['']) test('T15637', normal, compile, ['']) +test('T16179', normal, compile, ['']) |