IR: IrTypeAlias: Strip 'typealias' declarations in back-ends

This commit is contained in:
Dmitry Petrov
2019-07-23 14:36:04 +03:00
parent 6abb0ffe28
commit 2b43b09444
3 changed files with 58 additions and 0 deletions
@@ -98,6 +98,12 @@ private val lateinitLoweringPhase = makeJsModulePhase(
description = "Insert checks for lateinit field references"
)
private val stripTypeAliasDeclarationsPhase = makeJsModulePhase(
{ StripTypeAliasDeclarationsLowering() },
name = "StripTypeAliasDeclarations",
description = "Strip typealias declarations"
)
// TODO make all lambda-related stuff work with IrFunctionExpression and drop this phase
private val provisionalFunctionExpressionPhase = makeJsModulePhase(
{ ProvisionalFunctionExpressionLowering() },
@@ -396,6 +402,7 @@ val jsPhases = namedIrModulePhase(
lower = validateIrBeforeLowering then
testGenerationPhase then
expectDeclarationsRemovingPhase then
stripTypeAliasDeclarationsPhase then
provisionalFunctionExpressionPhase then
arrayConstructorPhase then
functionInliningPhase then