aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna/issue451/e.vhdl
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/gna/issue451/e.vhdl')
-rw-r--r--testsuite/gna/issue451/e.vhdl15
1 files changed, 15 insertions, 0 deletions
diff --git a/testsuite/gna/issue451/e.vhdl b/testsuite/gna/issue451/e.vhdl
new file mode 100644
index 000000000..ad69ed0c9
--- /dev/null
+++ b/testsuite/gna/issue451/e.vhdl
@@ -0,0 +1,15 @@
+entity e is end entity;
+architecture h of e is
+ type a is array(natural range<>, natural range<>) of integer_vector;
+ function f(x, y:integer := 0) return a is begin return (0 to 3=>(0 to 1=>(0 to 6=>y))); end function;
+ -- If the association list was mandatory f()(2,0)(5) would be far less confusing.
+ constant c :integer := f(2,0)(5);
+
+ type b is array(natural range<>) of integer_vector;
+ function g(x:integer := 0) return b is begin return (0 to 3=>(0 to 6=>45)); end function;
+ -- If the association list was mandatory g()(2)(5) would be far less confusing.
+ constant d :integer := g(2)(5);
+begin
+ assert false report integer'image(c) severity note;
+ assert false report integer'image(d) severity note;
+end architecture;