[FE 1.0] Implement deprecation warning for private constructors of sealed classes

^KT-44866
^KT-49729 Fixed
This commit is contained in:
Dmitriy Novozhilov
2021-11-16 17:21:47 +03:00
parent 93378b1a04
commit da02d25278
18 changed files with 277 additions and 4 deletions
@@ -22,7 +22,7 @@ sealed class Case3 private constructor(val x: Int) {
class Inheritor2 : Case3("Hello")
}
class Case3Inheritor3 : Case3(20) // should be an error in 1.6 (?)
class Case3Inheritor3 : <!RESOLUTION_TO_PRIVATE_CONSTRUCTOR_OF_SEALED_CLASS!>Case3<!>(20) // should be an error in 1.8
sealed class Case4 {
protected constructor(x: Int)