IR SymbolTable: don't allow unbound symbols in declare by signature only

This commit is contained in:
Mikhail Glukhikh
2020-06-24 10:00:59 +03:00
parent 7243d04f58
commit 456508a332
@@ -113,10 +113,10 @@ open class SymbolTable(
val symbol = if (existing == null) { val symbol = if (existing == null) {
createSymbol() createSymbol()
} else { } else {
unboundSymbols.remove(existing) throw AssertionError("Symbol for $sig already exists")
existing
} }
val result = createOwner(symbol) val result = createOwner(symbol)
// TODO: try to get rid of this
set(symbol.descriptor, symbol) set(symbol.descriptor, symbol)
return result return result
} }