KT-43941 [Sealed interfaces]: subclass intention

Restriction for sealed inheritors was relaxed. Instead of being nested
class members now they can be the members of the same module and
package.
This commit is contained in:
Andrei Klunnyi
2020-12-22 12:59:27 +01:00
parent 1cac8b0d61
commit 3f287d344e
11 changed files with 116 additions and 17 deletions
+8
View File
@@ -0,0 +1,8 @@
// "Implement sealed class" "true"
// WITH_RUNTIME
// SHOULD_BE_AVAILABLE_AFTER_EXECUTION
// COMPILER_ARGUMENTS: -XXLanguage:+SealedInterfaces
sealed class <caret>Base {
abstract fun foo(): Int
}