summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--testsuite/tests/ghci/scripts/ghci065.hs13
-rw-r--r--testsuite/tests/ghci/scripts/ghci065.script1
-rw-r--r--testsuite/tests/ghci/scripts/ghci065.stdout3
3 files changed, 17 insertions, 0 deletions
diff --git a/testsuite/tests/ghci/scripts/ghci065.hs b/testsuite/tests/ghci/scripts/ghci065.hs
index 8ff89cd12e..7d6d0cc497 100644
--- a/testsuite/tests/ghci/scripts/ghci065.hs
+++ b/testsuite/tests/ghci/scripts/ghci065.hs
@@ -5,6 +5,7 @@
-- this test is constructed with simple text (without markup) only.
--
+{-# LANGUAGE DuplicateRecordFields #-}
module Test where
-- | This is the haddock comment of a data declaration for Data1.
@@ -21,6 +22,18 @@ newtype Data4 =
-- | This is the haddock comment of a data constructor for Data4.
Data4 { getData4 :: Int }
+data DupeFields1 =
+ DF1 { dupeField :: Int -- ^ This is the first haddock comment of a duplicate record field.
+ }
+
+data DupeFields2 =
+ DF2 { dupeField :: Int -- ^ This is the second haddock comment of a duplicate record field.
+ }
+
+data DupeFields3 =
+ DF3 { dupeField :: Int -- No haddock
+ }
+
-- | This is the haddock comment of a function declaration for func1.
func1 :: Int -> Int -> Int
func1 x y = x + y
diff --git a/testsuite/tests/ghci/scripts/ghci065.script b/testsuite/tests/ghci/scripts/ghci065.script
index 7f05945576..12d03b1d91 100644
--- a/testsuite/tests/ghci/scripts/ghci065.script
+++ b/testsuite/tests/ghci/scripts/ghci065.script
@@ -7,6 +7,7 @@
:doc Val2b
:doc Data3
:doc Data4
+:doc dupeField
:doc func1
:doc func2
diff --git a/testsuite/tests/ghci/scripts/ghci065.stdout b/testsuite/tests/ghci/scripts/ghci065.stdout
index b14f3f503a..2ea0831856 100644
--- a/testsuite/tests/ghci/scripts/ghci065.stdout
+++ b/testsuite/tests/ghci/scripts/ghci065.stdout
@@ -3,6 +3,9 @@
This is the haddock comment of a data value for Val2b
This is the haddock comment of a data declaration for Data3.
This is the haddock comment of a data constructor for Data4.
+ This is the second haddock comment of a duplicate record field.
+
+ This is the first haddock comment of a duplicate record field.
This is the haddock comment of a function declaration for func1.
<has no documentation>
This is the haddock comment of a function declaration for func3.