summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_compile/T18851d.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/typecheck/should_compile/T18851d.hs')
-rw-r--r--testsuite/tests/typecheck/should_compile/T18851d.hs11
1 files changed, 11 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_compile/T18851d.hs b/testsuite/tests/typecheck/should_compile/T18851d.hs
new file mode 100644
index 0000000000..95ca539628
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/T18851d.hs
@@ -0,0 +1,11 @@
+{-# LANGUAGE DataKinds, TypeApplications, GADTs #-}
+
+module T18851d where
+
+import GHC.TypeNats
+
+data VSucc n where
+ F :: VSucc (1 + n)
+
+foo :: VSucc n -> VSucc n -> VSucc n
+foo (F @n1) F = F @n1