[MPP] Allow smart casts for properties from dependsOn modules
Smartcasts for public properties from different module are not stable because module declaring a property in general can be compiled separately from the module using it. However, if client module has dependsOn relation with declaring module their simultaneous compilation is guaranteed which makes this smart cast safe. Cache all transitive 'expected by' modules in module dependencies. Extend test to check smart casts are allowed for properties from transitive 'expected by' dependencies and prohibited otherwise. ^KT-42754 Fixed
This commit is contained in:
+9
-3
@@ -1,7 +1,13 @@
|
||||
MODULE common { platform=[JVM, JS, Native] }
|
||||
MODULE common1 { platform=[JVM, JS, Native] }
|
||||
MODULE common2 { platform=[JVM, JS, Native] }
|
||||
MODULE common3 { platform=[JVM, JS, Native] }
|
||||
MODULE common4 { platform=[JVM, JS, Native] }
|
||||
MODULE jvm1 { platform=[JVM] }
|
||||
MODULE jvm2 { platform=[JVM] }
|
||||
|
||||
jvm1 -> common { kind=DEPENDS_ON }
|
||||
jvm2 -> common { kind=DEPENDS_ON }
|
||||
common2 -> common1 { kind=DEPENDS_ON }
|
||||
common3 -> common1 { kind=DEPENDS_ON }
|
||||
common4 -> common2, common3 { kind=DEPENDS_ON }
|
||||
jvm1 -> common4 { kind=DEPENDS_ON }
|
||||
jvm2 -> common4 { kind=DEPENDS_ON }
|
||||
jvm2 -> jvm1 { kind=DEPENDENCY }
|
||||
|
||||
Reference in New Issue
Block a user