summaryrefslogtreecommitdiff
path: root/testsuite/tests
diff options
context:
space:
mode:
authorRichard Eisenberg <eir@cis.upenn.edu>2016-01-11 14:47:49 -0500
committerRichard Eisenberg <eir@cis.upenn.edu>2016-01-15 15:43:44 -0500
commit39ea4b4b19ea65d05f0d946084b316d5f5d2e675 (patch)
tree4cf57df9e8fe1d376279d7398998b55c0fe6dd04 /testsuite/tests
parent3a7f204f5d713ed4ac034d371fc10d8bedb39efa (diff)
downloadhaskell-39ea4b4b19ea65d05f0d946084b316d5f5d2e675.tar.gz
Fix #11254.
This moves the call to tcSubType into the context of the checkInstConstraints call, allowing the deferred type error somewhere to hang its hat.
Diffstat (limited to 'testsuite/tests')
-rw-r--r--testsuite/tests/typecheck/should_compile/T11254.stderr25
-rw-r--r--testsuite/tests/typecheck/should_compile/all.T2
2 files changed, 26 insertions, 1 deletions
diff --git a/testsuite/tests/typecheck/should_compile/T11254.stderr b/testsuite/tests/typecheck/should_compile/T11254.stderr
new file mode 100644
index 0000000000..25cd751aa7
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/T11254.stderr
@@ -0,0 +1,25 @@
+
+T11254.hs:16:10: warning:
+ • Couldn't match type ‘Frac Int’ with ‘Int’
+ arising from the superclasses of an instance declaration
+ • In the instance declaration for ‘ID Rational’
+
+T11254.hs:16:10: warning:
+ • No instance for (Fractional Int)
+ arising from the superclasses of an instance declaration
+ • In the instance declaration for ‘ID Rational’
+
+T11254.hs:16:10: warning:
+ • No instance for (ID Int)
+ arising from the superclasses of an instance declaration
+ • In the instance declaration for ‘ID Rational’
+
+T11254.hs:18:12: warning:
+ • Couldn't match type ‘GHC.Real.Ratio Integer’ with ‘Int’
+ Expected type: Rational -> Frac Rational
+ Actual type: Rational -> Rational
+ • When checking that instance signature for ‘embed’
+ is more general than its signature in the class
+ Instance sig: Rational -> Rational
+ Class sig: Rational -> Frac Rational
+ In the instance declaration for ‘ID Rational’
diff --git a/testsuite/tests/typecheck/should_compile/all.T b/testsuite/tests/typecheck/should_compile/all.T
index 0c1d0c1d98..bf43716e2a 100644
--- a/testsuite/tests/typecheck/should_compile/all.T
+++ b/testsuite/tests/typecheck/should_compile/all.T
@@ -486,5 +486,5 @@ test('T10935', normal, compile, [''])
test('T10971a', normal, compile, [''])
test('T11237', normal, compile, [''])
test('T10592', normal, compile, [''])
-test('T11254', expect_broken(11254), compile, [''])
test('T11305', normal, compile, [''])
+test('T11254', normal, compile, [''])