diff --git a/js/prose-decl.js b/js/prose-decl.js index a866da5..d51eb14 100644 --- a/js/prose-decl.js +++ b/js/prose-decl.js @@ -7,7 +7,7 @@ const SPECIFIER_CONFLICTS = [ ['class', 'struct', 'union', 'enum', 'void', 'complex', '_Atomic()', 'bool'], ['class', 'struct', 'union', 'enum', 'signed', 'unsigned', 'float', 'double', 'void', '_Atomic()'], - ['class', 'struct', 'union', 'enum', 'signed', 'unsigned', 'complex'], + ['class', 'struct', 'union', 'enum', 'signed', 'unsigned', 'typedef-name', 'bool', 'complex'], ['int', 'complex'], ['char', 'short', 'long', 'void', 'bool', 'complex'], ['int', 'float', 'double', 'void', '_Atomic()'], diff --git a/test/test.js b/test/test.js index 1e3e75c..6ee872e 100644 --- a/test/test.js +++ b/test/test.js @@ -178,4 +178,12 @@ describe('Examples', function () { assert.deepEqual(actual, expected); }); }); + + code = 'signed bool'; + describe(code, function () { + it('throws because "signed" and "bool" conflict', function () { + assert.throws(() => codeToProse(code), + {message: 'Conflicting specifiers signed and bool'}); + }); + }); });