The bug appeared when we turned “ultra light classes” on by default.
The difference with the old implementation is that
PsiClass.getTextRange() returns the correct non-null value.
This triggers JavaExecutionUtil#stepIntoSingleClass() to return
a light class instead of the original location (of a PsiIdentifier).
So AbstractJavaTestConfigurationProducer#isConfigurationFromContext()
returns true, and the wrong configuration is reused instead of
creating the new one.
By the way, for Java it also returns an identifier because of the
PsiTreeUtil.getParentOfType(element, PsiClass.class) != null check.
The proper fix should land in the newer versions of IDEA, however this
(hopefully, temporary) hack will fix test method gutters for
all platform versions.
Add visibility modifier to companion field
Const initializer is now getting for const properties only
Fixed tests:
UltraLightClassLoadingTestGenerated.testAnnotations
UltraLightClassLoadingTestGenerated.testInheritance
UltraLightClassLoadingTestGenerated.testProperties
UltraLightClassSanityTestGenerated.IdeRegression.testImplementingMutableSet
UltraLightClassSanityTestGenerated.IdeRegression.testOverridingFinalInternal_extra
UltraLightClassSanityTestGenerated.IdeRegression.testOverridingInternal
UltraLightClassSanityTestGenerated.IdeRegression.testOverridingInternal_extra
UltraLightClassSanityTestGenerated.IdeRegression.testOverridingProtected_extra
UltraLightFacadeClassTestGenerated.testProperties
UltraLightClassLoadingTestGenerated.testObjects
Remove INSTANCE field for local object declarations
Remove private suspend functions create from UL
Add correct extension function parameter name
Add support for setparam annotation modifier
UL classes built upon descriptors and UL support classes are saving a descriptors.
This could lead to descriptors leakage so we have to eliminate any fields with descriptor references.
Fixed #KT-34337
Fixes assert:
com.intellij.testFramework.LoggedErrorProcessor$TestLoggerAssertionError: org.jetbrains.kotlin.asJava.builder.StubComputationTracker requested as a service, but it is a component - convert it to a service or change call to project.getComponent()