From ba36fafb8447303b986e573a3c48ca7d14e2a095 Mon Sep 17 00:00:00 2001 From: Dmitry Savvinov Date: Thu, 21 Feb 2019 11:18:16 +0300 Subject: [PATCH] Create JsAnalyzerFacade with allowSliceRewrite=true Other facades (JVM, Common, Native) are already created with such flag. This should stop some known 'rewrite at slice'-exceptions from being thrown (KT-21405, KT-29705). For a more thorough investivation and details, refer to KT-30031. Also, see KT-30030: even though it was fixed by the different commit, the same scenario probably can be used to investigate other rewrites (even though they will reproduce much less frequently than original issue) ^KT-21405 Fixed ^KT-29705 Fixed --- .../src/org/jetbrains/kotlin/caches/resolve/JsAnalyzerFacade.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/idea/ide-common/src/org/jetbrains/kotlin/caches/resolve/JsAnalyzerFacade.kt b/idea/ide-common/src/org/jetbrains/kotlin/caches/resolve/JsAnalyzerFacade.kt index 659daf50b08..15a3045b40d 100644 --- a/idea/ide-common/src/org/jetbrains/kotlin/caches/resolve/JsAnalyzerFacade.kt +++ b/idea/ide-common/src/org/jetbrains/kotlin/caches/resolve/JsAnalyzerFacade.kt @@ -60,7 +60,7 @@ object JsAnalyzerFacade : ResolverForModuleFactory() { val container = createContainerForLazyResolve( moduleContext, declarationProviderFactory, - BindingTraceContext(), + BindingTraceContext(/* allowSliceRewrite = */ true), JsPlatform, TargetPlatformVersion.NoVersion, targetEnvironment,