diff options
author | Matthías Páll Gissurarson <mpg@mpg.is> | 2018-07-24 23:57:48 +0200 |
---|---|---|
committer | Krzysztof Gogolewski <krz.gogolewski@gmail.com> | 2018-07-24 23:58:57 +0200 |
commit | 0dc86f6bc454253969dedc31bed477eded4cf82d (patch) | |
tree | b6509c97086e3467155ebd32e925dae3bb5aab17 /testsuite/tests/typecheck/should_compile/T15370.stderr | |
parent | 47561c917deb8818161cd73a11a17582ba38c2de (diff) | |
download | haskell-0dc86f6bc454253969dedc31bed477eded4cf82d.tar.gz |
Clone relevant constraints to avoid side-effects on HoleDests. Fixes #15370.
Summary: When looking for valid hole fits, the constraints relevant
to the hole may sometimes contain a HoleDest. Previously,
these were not cloned, which could cause the filling of filled
coercion hole being, which would cause an assert to fail. This is now fixed.
Test Plan: Regression test included.
Reviewers: simonpj, bgamari, goldfire
Reviewed By: simonpj
Subscribers: rwbarton, thomie, carter
GHC Trac Issues: #15370
Differential Revision: https://phabricator.haskell.org/D5004
Diffstat (limited to 'testsuite/tests/typecheck/should_compile/T15370.stderr')
-rw-r--r-- | testsuite/tests/typecheck/should_compile/T15370.stderr | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_compile/T15370.stderr b/testsuite/tests/typecheck/should_compile/T15370.stderr new file mode 100644 index 0000000000..f26cf92c3d --- /dev/null +++ b/testsuite/tests/typecheck/should_compile/T15370.stderr @@ -0,0 +1,42 @@ + +T15370.hs:14:10: warning: [-Wdeferred-type-errors (in -Wdefault)] + • Couldn't match type ‘n’ with ‘j’ + ‘n’ is a rigid type variable bound by + the type signature for: + mkRefl :: forall k (n :: k) (j :: k). n :~: j + at T15370.hs:13:1-17 + ‘j’ is a rigid type variable bound by + the type signature for: + mkRefl :: forall k (n :: k) (j :: k). n :~: j + at T15370.hs:13:1-17 + Expected type: n :~: j + Actual type: n :~: n + • In the expression: Refl + In an equation for ‘mkRefl’: mkRefl = Refl + • Relevant bindings include + mkRefl :: n :~: j (bound at T15370.hs:14:1) + +T15370.hs:20:13: warning: [-Wdeferred-type-errors (in -Wdefault)] + • Couldn't match type ‘S r’ with ‘()’ + Expected type: () + Actual type: S r + • In the expression: no + _ + In a case alternative: Refl -> no + _ + In the expression: case mkRefl @x @y of { Refl -> no + _ } + • Relevant bindings include + no :: S r (bound at T15370.hs:18:7) + right :: S r -> () (bound at T15370.hs:18:1) + +T15370.hs:20:18: warning: [-Wtyped-holes (in -Wdefault)] + • Found hole: _ :: S r + Where: ‘r’, ‘y’, ‘x’ are rigid type variables bound by + the type signature for: + right :: forall x y (r :: Either x y). S r -> () + at T15370.hs:(16,1)-(17,18) + • In the second argument of ‘(+)’, namely ‘_’ + In the expression: no + _ + In a case alternative: Refl -> no + _ + • Relevant bindings include + no :: S r (bound at T15370.hs:18:7) + right :: S r -> () (bound at T15370.hs:18:1) + Constraints include y ~ x (from T15370.hs:20:5-8) |