Avoid using TypeSystemInferenceExtensionContextDelegate in FIR

It's only needed in old FE to avoid clashes when initializing DI

The main idea is gettind rid of intermediate interfaces because
each of them adds another intermediate DefaultImpls call
This commit is contained in:
Denis Zharkov
2019-12-12 12:41:36 +03:00
parent 25fdbdfecb
commit 0064429339
4 changed files with 17 additions and 8 deletions
@@ -105,6 +105,10 @@ interface TypeSystemCommonSuperTypesContext : TypeSystemContext, TypeSystemTypeF
fun TypeConstructorMarker.toErrorType(): SimpleTypeMarker
}
// This interface is only used to declare that implementing class is supposed to be used as a TypeSystemInferenceExtensionContext component
// Otherwise clash happens during DI container initialization: there are a lot of components that extend TypeSystemInferenceExtensionContext
// but they only has it among supertypes to bring additional receiver into their scopes, i.e. they are not intended to be used as
// component implementation for TypeSystemInferenceExtensionContext
interface TypeSystemInferenceExtensionContextDelegate : TypeSystemInferenceExtensionContext
interface TypeSystemInferenceExtensionContext : TypeSystemContext, TypeSystemBuiltInsContext, TypeSystemCommonSuperTypesContext {