aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/synth/issue1475/e2.vhdl
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/synth/issue1475/e2.vhdl')
-rw-r--r--testsuite/synth/issue1475/e2.vhdl15
1 files changed, 15 insertions, 0 deletions
diff --git a/testsuite/synth/issue1475/e2.vhdl b/testsuite/synth/issue1475/e2.vhdl
new file mode 100644
index 000000000..88b83c94d
--- /dev/null
+++ b/testsuite/synth/issue1475/e2.vhdl
@@ -0,0 +1,15 @@
+entity e2 is
+end;
+
+architecture behav of e2 is
+ type my_type is (lit1, lit2);
+
+ function "+" (l : my_type; r : natural) return my_type is
+ begin
+ return lit2;
+ end "+";
+
+ signal s : my_type := lit1;
+begin
+ assert s + (-1) = lit2;
+end behav;