[FE] Prohibit inheritance of sealed classes in different module

KT-20423
This commit is contained in:
Dmitriy Novozhilov
2020-11-24 14:42:10 +03:00
committed by TeamCityServer
parent f8d6f79c17
commit 57a081c399
17 changed files with 232 additions and 0 deletions
@@ -0,0 +1,17 @@
// ISSUE: KT-20423
// !LANGUAGE: +SealedInterfaces +FreedomForSealedClasses
// MODULE: m1
// FILE: a.kt
package a
sealed class Base
class A : Base()
// MODULE: m2(m1)
// FILE: b.kt
package a
class B : <!INVISIBLE_MEMBER, SEALED_INHERITOR_IN_DIFFERENT_MODULE!>Base<!>()