Fixed containingDeclaration for descriptors inside init-blocks for the case of no primary constructor
KT-10226 Wrong Imports optimization ("Unresolved reference" is being added)
#KT-10226 Fixed
This commit is contained in:
+10
@@ -0,0 +1,10 @@
|
||||
import java.io.File
|
||||
|
||||
class C {
|
||||
constructor(file: File)
|
||||
|
||||
init {
|
||||
val xxx = 1
|
||||
xxx.inc()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
import java.io.File
|
||||
|
||||
class C {
|
||||
constructor(file: File)
|
||||
|
||||
init {
|
||||
val xxx = 1
|
||||
xxx.inc()
|
||||
}
|
||||
}
|
||||
@@ -137,6 +137,12 @@ public class OptimizeImportsTestGenerated extends AbstractOptimizeImportsTest {
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("KT10226.kt")
|
||||
public void testKT10226() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/KT10226.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("KT9875.kt")
|
||||
public void testKT9875() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/KT9875.kt");
|
||||
|
||||
Reference in New Issue
Block a user