fix KT-9299 In a project with circular dependencies between modules, IDE reports error on use of internal class from another module, but the corresponding code still compiles and runs.
#KT-9299 Fixed
This commit is contained in:
Vendored
+26
@@ -0,0 +1,26 @@
|
||||
Cleaning output files:
|
||||
out/production/module1/META-INF/module1.kotlin_module
|
||||
out/production/module1/a/A.class
|
||||
out/production/module1/a/ClassAnnotation.class
|
||||
out/production/module1/a/FileAnnotation.class
|
||||
out/production/module1/a/Module1_aKt.class
|
||||
End of files
|
||||
Compiling files:
|
||||
module1/src/module1_a.kt
|
||||
End of files
|
||||
Cleaning output files:
|
||||
out/production/module2/META-INF/module2.kotlin_module
|
||||
out/production/module2/b/B.class
|
||||
out/production/module2/b/Module2_bKt.class
|
||||
End of files
|
||||
Compiling files:
|
||||
module2/src/module2_b.kt
|
||||
End of files
|
||||
COMPILATION FAILED
|
||||
Cannot access 'FileAnnotation': it is 'internal' in 'a'
|
||||
Cannot access 'A': it is 'internal' in 'a'
|
||||
Cannot access 'FileAnnotation': it is 'internal' in 'a'
|
||||
Cannot access 'ClassAnnotation': it is 'internal' in 'a'
|
||||
Cannot access 'ClassAnnotation': it is 'internal' in 'a'
|
||||
Cannot access 'A': it is 'internal' in 'a'
|
||||
Cannot access 'a': it is 'internal' in 'a'
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
module1->
|
||||
module2->module1
|
||||
Vendored
+14
@@ -0,0 +1,14 @@
|
||||
package a
|
||||
|
||||
@Target(AnnotationTarget.FILE)
|
||||
@Retention(AnnotationRetention.SOURCE)
|
||||
annotation class FileAnnotation()
|
||||
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
@Retention(AnnotationRetention.SOURCE)
|
||||
annotation class ClassAnnotation()
|
||||
|
||||
class A
|
||||
|
||||
fun a() {
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
package a
|
||||
|
||||
@Target(AnnotationTarget.FILE)
|
||||
@Retention(AnnotationRetention.SOURCE)
|
||||
internal annotation class FileAnnotation()
|
||||
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
@Retention(AnnotationRetention.SOURCE)
|
||||
internal annotation class ClassAnnotation()
|
||||
|
||||
internal class A
|
||||
|
||||
internal fun a(): String {
|
||||
return ":)"
|
||||
}
|
||||
Vendored
+13
@@ -0,0 +1,13 @@
|
||||
@file:FileAnnotation
|
||||
package b
|
||||
|
||||
import a.A
|
||||
import a.FileAnnotation
|
||||
import a.ClassAnnotation
|
||||
|
||||
@ClassAnnotation
|
||||
class B
|
||||
|
||||
fun b(param: a.A) {
|
||||
a.a()
|
||||
}
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
package c
|
||||
|
||||
fun c() {
|
||||
// This file doesn't use anything from module1, so it won't be recompiled after change
|
||||
}
|
||||
Reference in New Issue
Block a user