mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-10 08:31:29 +00:00
Mpp: KT-23457, fix importing common classes into common modules
Add test for KT-23457 NOTE: fixes 'importClassInCommon' test Other test cases added to increase coverage #KT-23457 Fixed
This commit is contained in:
3
idea/testData/multiModuleQuickFix/importClassInCommon/common/a.kt
vendored
Normal file
3
idea/testData/multiModuleQuickFix/importClassInCommon/common/a.kt
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
package foo
|
||||
|
||||
class Foo
|
||||
3
idea/testData/multiModuleQuickFix/importClassInCommon/common/a.kt.after
vendored
Normal file
3
idea/testData/multiModuleQuickFix/importClassInCommon/common/a.kt.after
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
package foo
|
||||
|
||||
class Foo
|
||||
7
idea/testData/multiModuleQuickFix/importClassInCommon/common/b.kt
vendored
Normal file
7
idea/testData/multiModuleQuickFix/importClassInCommon/common/b.kt
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
// "Import" "true"
|
||||
// ERROR: Unresolved reference: Foo
|
||||
package bar
|
||||
|
||||
fun use(f: <caret>Foo) {
|
||||
|
||||
}
|
||||
9
idea/testData/multiModuleQuickFix/importClassInCommon/common/b.kt.after
vendored
Normal file
9
idea/testData/multiModuleQuickFix/importClassInCommon/common/b.kt.after
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
// "Import" "true"
|
||||
// ERROR: Unresolved reference: Foo
|
||||
package bar
|
||||
|
||||
import foo.Foo
|
||||
|
||||
fun use(f: Foo) {
|
||||
|
||||
}
|
||||
3
idea/testData/multiModuleQuickFix/importClassInFromProductionInCommonTests/a_common/a.kt
vendored
Normal file
3
idea/testData/multiModuleQuickFix/importClassInFromProductionInCommonTests/a_common/a.kt
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
package foo
|
||||
|
||||
class Foo
|
||||
@@ -0,0 +1,3 @@
|
||||
package foo
|
||||
|
||||
class Foo
|
||||
@@ -0,0 +1,7 @@
|
||||
// "Import" "true"
|
||||
// ERROR: Unresolved reference: Foo
|
||||
package bar
|
||||
|
||||
fun use(f: <caret>Foo) {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
// "Import" "true"
|
||||
// ERROR: Unresolved reference: Foo
|
||||
package bar
|
||||
|
||||
import foo.Foo
|
||||
|
||||
fun use(f: Foo) {
|
||||
|
||||
}
|
||||
3
idea/testData/multiModuleQuickFix/importCommonClassInJs/common/a.kt
vendored
Normal file
3
idea/testData/multiModuleQuickFix/importCommonClassInJs/common/a.kt
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
package foo
|
||||
|
||||
class Foo
|
||||
7
idea/testData/multiModuleQuickFix/importCommonClassInJs/js/b.kt
vendored
Normal file
7
idea/testData/multiModuleQuickFix/importCommonClassInJs/js/b.kt
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
// "Import" "true"
|
||||
// ERROR: Unresolved reference: Foo
|
||||
package bar
|
||||
|
||||
fun use(f: <caret>Foo) {
|
||||
|
||||
}
|
||||
9
idea/testData/multiModuleQuickFix/importCommonClassInJs/js/b.kt.after
vendored
Normal file
9
idea/testData/multiModuleQuickFix/importCommonClassInJs/js/b.kt.after
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
// "Import" "true"
|
||||
// ERROR: Unresolved reference: Foo
|
||||
package bar
|
||||
|
||||
import foo.Foo
|
||||
|
||||
fun use(f: Foo) {
|
||||
|
||||
}
|
||||
3
idea/testData/multiModuleQuickFix/importCommonClassInJvm/common/a.kt
vendored
Normal file
3
idea/testData/multiModuleQuickFix/importCommonClassInJvm/common/a.kt
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
package foo
|
||||
|
||||
class Foo
|
||||
7
idea/testData/multiModuleQuickFix/importCommonClassInJvm/jvm/b.kt
vendored
Normal file
7
idea/testData/multiModuleQuickFix/importCommonClassInJvm/jvm/b.kt
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
// "Import" "true"
|
||||
// ERROR: Unresolved reference: Foo
|
||||
package bar
|
||||
|
||||
fun use(f: <caret>Foo) {
|
||||
|
||||
}
|
||||
9
idea/testData/multiModuleQuickFix/importCommonClassInJvm/jvm/b.kt.after
vendored
Normal file
9
idea/testData/multiModuleQuickFix/importCommonClassInJvm/jvm/b.kt.after
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
// "Import" "true"
|
||||
// ERROR: Unresolved reference: Foo
|
||||
package bar
|
||||
|
||||
import foo.Foo
|
||||
|
||||
fun use(f: Foo) {
|
||||
|
||||
}
|
||||
6
idea/testData/multiModuleQuickFix/importCommonFunInJvm/common/a.kt
vendored
Normal file
6
idea/testData/multiModuleQuickFix/importCommonFunInJvm/common/a.kt
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
|
||||
package foo
|
||||
|
||||
fun foo() {
|
||||
|
||||
}
|
||||
7
idea/testData/multiModuleQuickFix/importCommonFunInJvm/jvm/b.kt
vendored
Normal file
7
idea/testData/multiModuleQuickFix/importCommonFunInJvm/jvm/b.kt
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
// "Import" "true"
|
||||
// ERROR: Unresolved reference: foo
|
||||
package bar
|
||||
|
||||
fun use() {
|
||||
<caret>foo()
|
||||
}
|
||||
9
idea/testData/multiModuleQuickFix/importCommonFunInJvm/jvm/b.kt.after
vendored
Normal file
9
idea/testData/multiModuleQuickFix/importCommonFunInJvm/jvm/b.kt.after
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
// "Import" "true"
|
||||
// ERROR: Unresolved reference: foo
|
||||
package bar
|
||||
|
||||
import foo.foo
|
||||
|
||||
fun use() {
|
||||
foo()
|
||||
}
|
||||
3
idea/testData/multiModuleQuickFix/importExpectClassWithActualInJvm/common/a.kt
vendored
Normal file
3
idea/testData/multiModuleQuickFix/importExpectClassWithActualInJvm/common/a.kt
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
package foo
|
||||
|
||||
expect class Foo
|
||||
3
idea/testData/multiModuleQuickFix/importExpectClassWithActualInJvm/jvm/a_jvm.kt
vendored
Normal file
3
idea/testData/multiModuleQuickFix/importExpectClassWithActualInJvm/jvm/a_jvm.kt
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
package foo
|
||||
|
||||
actual class Foo
|
||||
7
idea/testData/multiModuleQuickFix/importExpectClassWithActualInJvm/jvm/b.kt
vendored
Normal file
7
idea/testData/multiModuleQuickFix/importExpectClassWithActualInJvm/jvm/b.kt
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
// "Import" "true"
|
||||
// ERROR: Unresolved reference: Foo
|
||||
package bar
|
||||
|
||||
fun use(f: <caret>Foo) {
|
||||
|
||||
}
|
||||
9
idea/testData/multiModuleQuickFix/importExpectClassWithActualInJvm/jvm/b.kt.after
vendored
Normal file
9
idea/testData/multiModuleQuickFix/importExpectClassWithActualInJvm/jvm/b.kt.after
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
// "Import" "true"
|
||||
// ERROR: Unresolved reference: Foo
|
||||
package bar
|
||||
|
||||
import foo.Foo
|
||||
|
||||
fun use(f: Foo) {
|
||||
|
||||
}
|
||||
3
idea/testData/multiModuleQuickFix/importExpectClassWithoutActualInJvm/common/a.kt
vendored
Normal file
3
idea/testData/multiModuleQuickFix/importExpectClassWithoutActualInJvm/common/a.kt
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
package foo
|
||||
|
||||
expect class Foo
|
||||
13
idea/testData/multiModuleQuickFix/importExpectClassWithoutActualInJvm/jvm/b.kt
vendored
Normal file
13
idea/testData/multiModuleQuickFix/importExpectClassWithoutActualInJvm/jvm/b.kt
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
// "Import" "false"
|
||||
// ACTION: Create annotation 'Foo'
|
||||
// ACTION: Create class 'Foo'
|
||||
// ACTION: Create enum 'Foo'
|
||||
// ACTION: Create interface 'Foo'
|
||||
// ACTION: Create type alias 'Foo'
|
||||
// ACTION: Create type parameter 'Foo' in function 'use'
|
||||
// ERROR: Unresolved reference: Foo
|
||||
package bar
|
||||
|
||||
fun use(f: <caret>Foo) {
|
||||
|
||||
}
|
||||
13
idea/testData/multiModuleQuickFix/importExpectClassWithoutActualInJvm/jvm/b.kt.after
vendored
Normal file
13
idea/testData/multiModuleQuickFix/importExpectClassWithoutActualInJvm/jvm/b.kt.after
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
// "Import" "false"
|
||||
// ACTION: Create annotation 'Foo'
|
||||
// ACTION: Create class 'Foo'
|
||||
// ACTION: Create enum 'Foo'
|
||||
// ACTION: Create interface 'Foo'
|
||||
// ACTION: Create type alias 'Foo'
|
||||
// ACTION: Create type parameter 'Foo' in function 'use'
|
||||
// ERROR: Unresolved reference: Foo
|
||||
package bar
|
||||
|
||||
fun use(f: Foo) {
|
||||
|
||||
}
|
||||
6
idea/testData/multiModuleQuickFix/importFunInCommon/common/a.kt
vendored
Normal file
6
idea/testData/multiModuleQuickFix/importFunInCommon/common/a.kt
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
|
||||
package foo
|
||||
|
||||
fun foo() {
|
||||
|
||||
}
|
||||
7
idea/testData/multiModuleQuickFix/importFunInCommon/common/b.kt
vendored
Normal file
7
idea/testData/multiModuleQuickFix/importFunInCommon/common/b.kt
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
// "Import" "true"
|
||||
// ERROR: Unresolved reference: foo
|
||||
package bar
|
||||
|
||||
fun use() {
|
||||
<caret>foo()
|
||||
}
|
||||
9
idea/testData/multiModuleQuickFix/importFunInCommon/common/b.kt.after
vendored
Normal file
9
idea/testData/multiModuleQuickFix/importFunInCommon/common/b.kt.after
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
// "Import" "true"
|
||||
// ERROR: Unresolved reference: foo
|
||||
package bar
|
||||
|
||||
import foo.foo
|
||||
|
||||
fun use() {
|
||||
foo()
|
||||
}
|
||||
Reference in New Issue
Block a user