GP-3186 Add 0 size exports to consistency check for subtables

This commit is contained in:
caheckman 2023-03-13 14:30:34 -04:00
parent d84d6df8f6
commit 349b891165
2 changed files with 6 additions and 6 deletions

View file

@ -725,7 +725,7 @@ class ConsistencyChecker {
}
private boolean checkSubtable(SubtableSymbol sym) {
int tablesize = 0;
int tablesize = -1;
int numconstruct = sym.getNumConstructors();
Constructor ct;
boolean testresult = true;
@ -757,10 +757,10 @@ class ConsistencyChecker {
}
seennonemptyexport = true;
int exsize = recoverSize(exportres.getSize(), ct);
if (tablesize == 0) {
if (tablesize == -1) {
tablesize = exsize;
}
if ((exsize != 0) && (exsize != tablesize)) {
if (exsize != tablesize) {
compiler.reportError(ct.location, String.format(
"Table '%s' has inconsistent export size; Constructor at %s is first conflict",
sym.getName(), ct.location));