summaryrefslogtreecommitdiff
path: root/testsuite/tests/array/should_run/arr007.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/array/should_run/arr007.hs')
-rw-r--r--testsuite/tests/array/should_run/arr007.hs11
1 files changed, 11 insertions, 0 deletions
diff --git a/testsuite/tests/array/should_run/arr007.hs b/testsuite/tests/array/should_run/arr007.hs
new file mode 100644
index 0000000000..d4461d8d5e
--- /dev/null
+++ b/testsuite/tests/array/should_run/arr007.hs
@@ -0,0 +1,11 @@
+-- !!! Array - accessing empty arrays
+--
+-- empty arrays are legal, but indexing them is undefined!
+--
+import Data.Array
+
+main =
+ let
+ a1 = array (1::Int,0) [(1,'a')]
+ in
+ print (a1!0)