From 1eed6a817d60905b3174b221bcd9f9276eed624d Mon Sep 17 00:00:00 2001 From: Guillaume Allais Date: Thu, 25 Jul 2024 09:49:54 +0100 Subject: [PATCH] [ fix #1236 ] Already fixed, add test case --- tests/idris2/error/error030/Issue1236.idr | 5 +++++ tests/idris2/error/error030/expected | 7 +++++++ tests/idris2/error/error030/run | 3 +++ 3 files changed, 15 insertions(+) create mode 100644 tests/idris2/error/error030/Issue1236.idr create mode 100644 tests/idris2/error/error030/expected create mode 100755 tests/idris2/error/error030/run diff --git a/tests/idris2/error/error030/Issue1236.idr b/tests/idris2/error/error030/Issue1236.idr new file mode 100644 index 000000000..81c44dce7 --- /dev/null +++ b/tests/idris2/error/error030/Issue1236.idr @@ -0,0 +1,5 @@ +private +data Foo : Type + +public export +data Foo : Type where diff --git a/tests/idris2/error/error030/expected b/tests/idris2/error/error030/expected new file mode 100644 index 000000000..412228a23 --- /dev/null +++ b/tests/idris2/error/error030/expected @@ -0,0 +1,7 @@ +1/1: Building Issue1236 (Issue1236.idr) +Warning: Main.Foo has been forward-declared with private visibility, cannot change to public export. This will be an error in a later release. + +Issue1236:4:1--5:22 + 4 | public export + 5 | data Foo : Type where + diff --git a/tests/idris2/error/error030/run b/tests/idris2/error/error030/run new file mode 100755 index 000000000..e68088a33 --- /dev/null +++ b/tests/idris2/error/error030/run @@ -0,0 +1,3 @@ +. ../../../testutils.sh + +check Issue1236.idr