From 01f5324f8eaa2ce28d617922bc4d3b680ad4fc38 Mon Sep 17 00:00:00 2001 From: Joachim Breitner Date: Thu, 7 Oct 2021 15:21:25 +0200 Subject: Recover test case for T11547 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit commit 98c7749 has reverted commit 59d7ee53, including the test that that file added. That test case is still valuable, so I am re-adding it. I add it with it’s current (broken) behavior so that whoever fixes it intentionally or accidentially will notice and then commit the actual desired behavior (which is kinda unspecified, see https://gitlab.haskell.org/ghc/ghc/-/issues/20455#note_382030) --- testsuite/tests/ghci/scripts/T11547.script | 9 +++++++++ testsuite/tests/ghci/scripts/T11547.stderr | 5 +++++ testsuite/tests/ghci/scripts/T11547.stdout | 4 ++++ testsuite/tests/ghci/scripts/all.T | 1 + 4 files changed, 19 insertions(+) create mode 100644 testsuite/tests/ghci/scripts/T11547.script create mode 100644 testsuite/tests/ghci/scripts/T11547.stderr create mode 100644 testsuite/tests/ghci/scripts/T11547.stdout (limited to 'testsuite/tests/ghci') diff --git a/testsuite/tests/ghci/scripts/T11547.script b/testsuite/tests/ghci/scripts/T11547.script new file mode 100644 index 0000000000..c4c15d6f78 --- /dev/null +++ b/testsuite/tests/ghci/scripts/T11547.script @@ -0,0 +1,9 @@ +foo = foo +:t Ghci1.foo +foo = foo +:t Ghci2.foo +:t Ghci1.foo +data Foo = Foo | Bar +data Foo = Bar +:t Foo +:t Ghci3.Bar diff --git a/testsuite/tests/ghci/scripts/T11547.stderr b/testsuite/tests/ghci/scripts/T11547.stderr new file mode 100644 index 0000000000..2623e4659f --- /dev/null +++ b/testsuite/tests/ghci/scripts/T11547.stderr @@ -0,0 +1,5 @@ + +:1:1: error: + • GHC internal error: ‘Ghci1.foo’ is not in scope during type checking, but it passed the renamer + tcl_env of environment: [] + • In the expression: Ghci1.foo diff --git a/testsuite/tests/ghci/scripts/T11547.stdout b/testsuite/tests/ghci/scripts/T11547.stdout new file mode 100644 index 0000000000..f808e0c90e --- /dev/null +++ b/testsuite/tests/ghci/scripts/T11547.stdout @@ -0,0 +1,4 @@ +Ghci1.foo :: t +Ghci2.foo :: t +Foo :: Ghci3.Foo +Ghci3.Bar :: Ghci3.Foo diff --git a/testsuite/tests/ghci/scripts/all.T b/testsuite/tests/ghci/scripts/all.T index 93199562f3..d8c80e9543 100755 --- a/testsuite/tests/ghci/scripts/all.T +++ b/testsuite/tests/ghci/scripts/all.T @@ -254,6 +254,7 @@ test('T11376', normal, ghci_script, ['T11376.script']) test('T12007', normal, ghci_script, ['T12007.script']) test('T11975', normal, ghci_script, ['T11975.script']) test('T10963', normal, ghci_script, ['T10963.script']) +test('T11547', normal, ghci_script, ['T11547.script']) test('T11721', normal, ghci_script, ['T11721.script']) test('T12005', normal, ghci_script, ['T12005.script']) test('T12023', normal, makefile_test, []) -- cgit v1.2.1