3f287d344e
Restriction for sealed inheritors was relaxed. Instead of being nested class members now they can be the members of the same module and package.
12 lines
304 B
Kotlin
Vendored
12 lines
304 B
Kotlin
Vendored
// "Implement sealed class" "true"
|
|
// WITH_RUNTIME
|
|
// SHOULD_BE_AVAILABLE_AFTER_EXECUTION
|
|
// COMPILER_ARGUMENTS: -XXLanguage:+SealedInterfaces
|
|
|
|
sealed class <caret>Base {
|
|
abstract fun foo(): Int
|
|
|
|
class BaseImpl : Base() {
|
|
override fun foo() = throw UnsupportedOperationException()
|
|
}
|
|
} |