Migrate all JDK 15 related tests to JDK 17
This commit is contained in:
committed by
TeamCityServer
parent
452dfd6edd
commit
ce3562f0e8
Vendored
+17
@@ -0,0 +1,17 @@
|
||||
// WITH_REFLECT
|
||||
// FILE: Base.java
|
||||
public sealed class Base permits O, K {}
|
||||
|
||||
// FILE: O.java
|
||||
public final class O extends Base {}
|
||||
|
||||
// FILE: K.java
|
||||
public non-sealed class K extends Base {}
|
||||
|
||||
// FILE: main.kt
|
||||
|
||||
fun box(): String {
|
||||
val clazz = Base::class.java
|
||||
if (!clazz.isSealed) return "Error: Base is not sealed"
|
||||
return clazz.permittedSubclasses.joinToString("") { it.simpleName ?: "_No name provided_" }
|
||||
}
|
||||
Reference in New Issue
Block a user