diff options
author | Ryan Scott <ryan.gl.scott@gmail.com> | 2017-04-28 13:24:11 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2017-04-28 13:24:24 -0400 |
commit | 69b9b853e3e68191cdfa8aec0e4da966298a2659 (patch) | |
tree | 3fb474d86a0866c006f662003ff9b8ac2bbce99e | |
parent | ba597c1dd1daf9643b72dc7aeace8d6b3fce84eb (diff) | |
download | haskell-69b9b853e3e68191cdfa8aec0e4da966298a2659.tar.gz |
Add regression test for #12104
Commit 2f9f1f86849ebc18af409c9b3fd809c9cd464021
(#13487) fixes #12104 as well. This adds a regression test for the
program reported in #12104 to keep it fixed.
Test Plan: make test TEST=T12104
Reviewers: bgamari, austin
Reviewed By: bgamari
Subscribers: rwbarton, thomie
GHC Trac Issues: #12104
Differential Revision: https://phabricator.haskell.org/D3495
-rw-r--r-- | testsuite/tests/typecheck/should_compile/T12104.hs | 11 | ||||
-rw-r--r-- | testsuite/tests/typecheck/should_compile/T12104.stderr | 5 | ||||
-rw-r--r-- | testsuite/tests/typecheck/should_compile/all.T | 1 |
3 files changed, 17 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_compile/T12104.hs b/testsuite/tests/typecheck/should_compile/T12104.hs new file mode 100644 index 0000000000..12c309c12f --- /dev/null +++ b/testsuite/tests/typecheck/should_compile/T12104.hs @@ -0,0 +1,11 @@ +{-# LANGUAGE TypeFamilies, DataKinds, UndecidableInstances #-} + +module T12104 where + +import GHC.TypeLits + +type family F a where + F a = TypeError (Text "error") + +err :: F () +err = () diff --git a/testsuite/tests/typecheck/should_compile/T12104.stderr b/testsuite/tests/typecheck/should_compile/T12104.stderr new file mode 100644 index 0000000000..784855158b --- /dev/null +++ b/testsuite/tests/typecheck/should_compile/T12104.stderr @@ -0,0 +1,5 @@ + +T12104.hs:11:7: warning: [-Wdeferred-type-errors (in -Wdefault)] + • error + • In the expression: () + In an equation for ‘err’: err = () diff --git a/testsuite/tests/typecheck/should_compile/all.T b/testsuite/tests/typecheck/should_compile/all.T index fcb80da61e..67fe104155 100644 --- a/testsuite/tests/typecheck/should_compile/all.T +++ b/testsuite/tests/typecheck/should_compile/all.T @@ -512,6 +512,7 @@ test('T11339c', normal, compile, ['']) test('T11339d', normal, compile, ['']) test('T11974', normal, compile, ['']) test('T12067', [], multimod_compile, ['T12067', '-v0']) +test('T12104', normal, compile, ['-fdefer-type-errors']) test('T12185', normal, compile, ['']) test('T12133', normal, compile, ['']) test('T12381', normal, compile, ['']) |