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:
+7
@@ -0,0 +1,7 @@
|
||||
'internal open val member: kotlin.Int defined in test.ClassBB1' has no access to 'internal abstract val member: kotlin.Int defined in test.ClassB1', so it cannot override it at line 14, column 14
|
||||
Cannot access 'InternalClass1': it is 'internal' in 'test' at line 5, column 13
|
||||
Cannot access 'InternalClass1': it is 'internal' in 'test' at line 8, column 36
|
||||
Cannot access 'InternalClass2': it is 'internal' in 'test' at line 19, column 15
|
||||
Cannot access 'InternalClassAnnotation': it is 'internal' in 'test' at line 10, column 2
|
||||
Cannot access 'InternalFileAnnotation': it is 'internal' in 'test' at line 1, column 7
|
||||
Cannot access 'member': it is 'invisible_fake' in 'ClassAA1' at line 27, column 25
|
||||
Vendored
+9
@@ -2,9 +2,18 @@ package test
|
||||
|
||||
internal open class InternalClass1
|
||||
|
||||
@Target(AnnotationTarget.FILE)
|
||||
@Retention(AnnotationRetention.SOURCE)
|
||||
internal annotation class InternalFileAnnotation()
|
||||
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
@Retention(AnnotationRetention.SOURCE)
|
||||
internal annotation class InternalClassAnnotation()
|
||||
|
||||
abstract class ClassA1(internal val member: Int)
|
||||
|
||||
abstract class ClassB1 {
|
||||
internal abstract val member: Int
|
||||
}
|
||||
|
||||
class ClassD: InternalClass2()
|
||||
Vendored
+5
-3
@@ -1,11 +1,13 @@
|
||||
// ERROR: 'internal open val member: kotlin.Int defined in test.ClassBB1' has no access to 'internal abstract val member: kotlin.Int defined in test.ClassB1', so it cannot override it
|
||||
// ERROR: Cannot access 'InternalClass1': it is 'internal' in 'test'
|
||||
// ERROR: Cannot access 'member': it is 'invisible_fake' in 'ClassAA1'
|
||||
@file:InternalFileAnnotation
|
||||
|
||||
package test
|
||||
|
||||
import test.InternalClass1
|
||||
|
||||
// InternalClass1, ClassA1, ClassB1 are in module1
|
||||
class ClassInheritedFromInternal1: InternalClass1()
|
||||
|
||||
@InternalClassAnnotation
|
||||
class ClassAA1 : ClassA1(10)
|
||||
|
||||
class ClassBB1 : ClassB1() {
|
||||
|
||||
Reference in New Issue
Block a user