chore: set isComplete flag also for interfaces that do not contain constructor fields.

This commit is contained in:
Artem Kobzar
2022-03-21 18:53:04 +00:00
committed by Space
parent d881f0d2a6
commit 0153f5d92a
@@ -153,15 +153,12 @@ private fun completeInterfaceCache(ctor: Ctor): IsImplementsCache? {
}
}
val constructor = fastGetPrototype(ctor)?.constructor ?: return null
val parentInterfacesCache = completeInterfaceCache(constructor) ?: return interfacesCache
val parentInterfacesCache = fastGetPrototype(ctor)?.constructor?.let(::completeInterfaceCache)
if (interfacesCache == null) return parentInterfacesCache
interfacesCache.extendCacheWith(parentInterfacesCache)
interfacesCache.isComplete = true
return interfacesCache
return interfacesCache?.apply {
extendCacheWith(parentInterfacesCache)
isComplete = true
} ?: parentInterfacesCache
}
// Old JS Backend