Test fixes

This commit is contained in:
dragonmacher 2021-03-23 12:52:08 -04:00
parent 8c71f06855
commit 1b36a099f4
2 changed files with 11 additions and 8 deletions

View file

@ -2351,13 +2351,14 @@ public class SymbolManager implements SymbolTable, ManagerDB {
return;
}
if (!(namespace instanceof NamespaceDB)) {
Symbol symbol = namespace.getSymbol();
if (!(symbol instanceof SymbolDB)) {
// unexpected namespace type; all supported types will be db objects
throw new IllegalArgumentException(
"Namespace is not a valid parent for symbols: " +
namespace.getClass());
"Namespace is not a valid parent for symbols: " + namespace.getClass());
}
SymbolDB dbSymbol = (SymbolDB) namespace.getSymbol();
SymbolDB dbSymbol = (SymbolDB) symbol;
if (program != dbSymbol.getProgram()) {
throw new IllegalArgumentException(
"Namespace symbol is from a different program");