Add extra parent checks in Fir2IrLazyClass

This commit is contained in:
Mikhail Glukhikh
2020-06-19 15:58:51 +03:00
parent 13f7b6a22e
commit f7be373711
@@ -132,7 +132,7 @@ class Fir2IrLazyClass(
if (declaration.name !in processedNames) {
processedNames += declaration.name
scope.processFunctionsByName(declaration.name) {
if (it is FirNamedFunctionSymbol) {
if (it is FirNamedFunctionSymbol && it.callableId.classId == fir.symbol.classId) {
if (it.isAbstractMethodOfAny()) {
return@processFunctionsByName
}
@@ -175,6 +175,11 @@ class Fir2IrLazyClass(
with(fakeOverrideGenerator) {
result += getFakeOverrides(fir, processedNames)
}
for (declaration in result) {
if (declaration.parent != this) {
throw AssertionError()
}
}
result
}