Remove hacky re-initialization of PsiSubstitutor.KEY (branch 193)

After IDEA commit
https://github.com/JetBrains/intellij-community/commit/8b0af117241a074f5681fa93be74c6f1812497ba#diff-9b39aafa0a7b8d4f089100f3968931d0
this re-initialization is no more necessary. Moreover, it's harmful,
because this KEY is used as a map key in IDEA code,
and we cannot find information stored by this key.
This was a hidden reason of FIR / IR test failures in branch 193.

After this commit, FIR / IR tests in branch 193 should be fixed
This commit is contained in:
Mikhail Glukhikh
2019-11-26 13:13:48 +03:00
parent 81699299f5
commit 178dbd3c5d
@@ -117,7 +117,6 @@ public class KotlinCoreApplicationEnvironment extends CoreApplicationEnvironment
myApplication.registerService(EmptySubstitutor.class, emptySubstitutor);
// Patch null values obtained because of cyclic dependency during initialization
updateInterfaceField(PsiSubstitutor.class, "KEY", KeyWithDefaultValue.create("SUBSTITUTOR", emptySubstitutor));
updateInterfaceField(PsiSubstitutor.class, "EMPTY", emptySubstitutor);
updateInterfaceField(PsiSubstitutor.class, "UNKNOWN", PsiSubstitutor.EMPTY);