K2: reproduce KT-65111
This commit is contained in:
committed by
Space Team
parent
dd4b1abc6a
commit
ae6aef3a63
@@ -0,0 +1,39 @@
|
||||
// TARGET_BACKEND: JVM_IR
|
||||
// IGNORE_BACKEND_K2: JVM_IR
|
||||
// ISSUE: KT-65111
|
||||
|
||||
// FILE: plugin/Plugin.java
|
||||
|
||||
package plugin;
|
||||
|
||||
import entities.*;
|
||||
|
||||
public class Plugin {
|
||||
public CommonFields getCommonFields() {
|
||||
return new CommonFields("OK");
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: entities/CommonFields.kt
|
||||
|
||||
package entities
|
||||
|
||||
data class CommonFields(val screenShots: String)
|
||||
|
||||
// FILE: test/foo.kt
|
||||
|
||||
package test
|
||||
|
||||
import plugin.Plugin
|
||||
|
||||
fun foo(plugin: Plugin): String? {
|
||||
return plugin.commonFields?.screenShots
|
||||
}
|
||||
|
||||
// FILE: example/test.kt
|
||||
|
||||
import test.foo
|
||||
import plugin.Plugin
|
||||
|
||||
fun box(): String =
|
||||
foo(Plugin())!!
|
||||
Reference in New Issue
Block a user