%merge: clearer tests on diagnostics

* tests/glr-regression.at: Use caret errors.
This commit is contained in:
Akim Demaille
2020-12-30 08:25:39 +01:00
parent 92e943bd24
commit edfcca8481

View File

@@ -1944,11 +1944,19 @@ sym3: %merge<merge> { $$ = 0; } ;
]AT_MAIN_DEFINE[
]])
AT_BISON_CHECK([[-o glr-regr18.c -rall glr-regr18.y]], 1, [],
AT_BISON_CHECK([[-o glr-regr18.c -rall -fcaret glr-regr18.y]], 1, [],
[[glr-regr18.y:30.18-24: error: result type clash on merge function 'merge': <type2> != <type1>
30 | sym2: sym3 %merge<merge> { $$ = $][1; } ;
| ^~~~~~~
glr-regr18.y:29.18-24: note: previous declaration
29 | sym1: sym2 %merge<merge> { $$ = $][1; } ;
| ^~~~~~~
glr-regr18.y:31.13-19: error: result type clash on merge function 'merge': <type3> != <type2>
31 | sym3: %merge<merge> { $$ = 0; } ;
| ^~~~~~~
glr-regr18.y:30.18-24: note: previous declaration
30 | sym2: sym3 %merge<merge> { $$ = $][1; } ;
| ^~~~~~~
]])
AT_BISON_OPTION_POPDEFS