[LL FIR] improve contract violation checks

Add check into LLFirModuleLazyDeclarationResolver to die fast
and avoid StackOverflowError for jumping phases

^KT-56551
^KT-57802
^KT-57811
This commit is contained in:
Dmitrii Gridin
2023-09-21 19:47:45 +02:00
committed by Space Team
parent 0fb3c033e7
commit 96c45c74e8
10 changed files with 83 additions and 2 deletions
@@ -0,0 +1,22 @@
// IGNORE_REVERSED_RESOLVE
// IGNORE_CONTRACT_VIOLATIONS
// FIR_IDENTICAL
// FILE: Bar.java
public class Bar {
public static final int BAR = Foo.FOO + 1;
}
// FILE: Test.kt
class Foo {
companion object {
const val FOO = Baz.BAZ + 1
}
}
class Baz {
companion object {
const val BAZ = Bar.BAR + 1
}
}