b79b94fe75
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
14 lines
478 B
Plaintext
Vendored
14 lines
478 B
Plaintext
Vendored
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] }
|
|
|
|
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 }
|