67fc46a190
#KT-57429 Fixed
27 lines
441 B
Kotlin
Vendored
27 lines
441 B
Kotlin
Vendored
// TARGET_BACKEND: JVM
|
|
|
|
// FILE: Foo.java
|
|
|
|
public class Foo {
|
|
public abstract static class Bar extends Foo {
|
|
|
|
}
|
|
|
|
public static class Buz extends Bar {
|
|
public String str = "OK";
|
|
}
|
|
}
|
|
|
|
// FILE: Box.kt
|
|
|
|
class Box<out T : Foo>(val foo: T) {
|
|
val str: String
|
|
get() {
|
|
var foo: Foo = foo
|
|
if (foo is Foo.Buz) {
|
|
return foo.str
|
|
}
|
|
return "";
|
|
}
|
|
}
|