summaryrefslogtreecommitdiff
path: root/tests/input.at
diff options
context:
space:
mode:
Diffstat (limited to 'tests/input.at')
-rw-r--r--tests/input.at29
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/input.at b/tests/input.at
index 200fa076..bb37be0a 100644
--- a/tests/input.at
+++ b/tests/input.at
@@ -294,6 +294,35 @@ input.y:1.13-15: warning: symbol foo is used, but is not defined as a token and
AT_CLEANUP
+## ----------------------------------------------------- ##
+## Unassociated types used for a printer or destructor. ##
+## ----------------------------------------------------- ##
+
+AT_SETUP([Unassociated types used for a printer or destructor])
+
+AT_DATA([[input.y]],
+[[%token <type1> tag1
+%type <type2> tag2
+
+%printer { } <type1> <type3>
+%destructor { } <type2> <type4>
+
+%%
+
+exp: tag1 { $1; }
+ | tag2 { $1; }
+
+tag2: "a" { $$; }
+]])
+
+AT_BISON_CHECK([input.y], [0], [],
+[[input.y:4.22-28: warning: type <type3> is used, but is not associated to any symbol
+input.y:5.25-31: warning: type <type4> is used, but is not associated to any symbol
+]])
+
+AT_CLEANUP
+
+
## ---------------------------------------- ##
## Unused values with default %destructor. ##
## ---------------------------------------- ##