[Test] Add test for KT-40851

This commit is contained in:
Dmitriy Novozhilov
2023-07-03 16:34:21 +03:00
committed by Space Team
parent eb041d5d6d
commit 31d046e8cd
7 changed files with 56 additions and 0 deletions
@@ -0,0 +1,13 @@
// COMPARE_WITH_LIGHT_TREE
// ISSUE: KT-40851
fun error(): Nothing = throw Exception()
class Some() {
<!MUST_BE_INITIALIZED_OR_BE_ABSTRACT!>var x: Int<!>
val y: Int = error()
init {
x = 1;
}
}