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 = fastGetPrototype(ctor)?.constructor?.let(::completeInterfaceCache)
val parentInterfacesCache = completeInterfaceCache(constructor) ?: return interfacesCache
if (interfacesCache == null) return parentInterfacesCache return interfacesCache?.apply {
extendCacheWith(parentInterfacesCache)
interfacesCache.extendCacheWith(parentInterfacesCache) isComplete = true
interfacesCache.isComplete = true } ?: parentInterfacesCache
return interfacesCache
} }
// Old JS Backend // Old JS Backend