Enhanced constructor descriptor should not loose its source!
#KT-11256 Fixed
This commit is contained in:
+1
-1
@@ -118,7 +118,7 @@ public class JavaConstructorDescriptor extends ConstructorDescriptorImpl impleme
|
||||
@NotNull List<KotlinType> enhancedValueParametersTypes,
|
||||
@NotNull KotlinType enhancedReturnType
|
||||
) {
|
||||
JavaConstructorDescriptor enhanced = createSubstitutedCopy(getContainingDeclaration(), /* original = */ null, getKind(), null, false);
|
||||
JavaConstructorDescriptor enhanced = createSubstitutedCopy(getContainingDeclaration(), /* original = */ null, getKind(), null, true);
|
||||
// We do not use doSubstitute here as in JavaMethodDescriptor.enhance because type parameters of constructor belongs to class
|
||||
enhanced.initialize(
|
||||
enhancedReceiverType,
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class JavaClass {
|
||||
public JavaClass(@NotNull String s) {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
class A {
|
||||
fun foo() {
|
||||
<caret>JavaClass()
|
||||
}
|
||||
}
|
||||
|
||||
// REF: (in JavaClass).JavaClass(String)
|
||||
@@ -245,6 +245,12 @@ public class ReferenceResolveTestGenerated extends AbstractReferenceResolveTest
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("JavaConstructorNotNullParameter.kt")
|
||||
public void testJavaConstructorNotNullParameter() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/JavaConstructorNotNullParameter.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("JavaEnumEntry.kt")
|
||||
public void testJavaEnumEntry() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/JavaEnumEntry.kt");
|
||||
|
||||
Reference in New Issue
Block a user