Fix recursion in contract declaration analysis. KT-26386 Fixed

Issue fixed only in old inference
This commit is contained in:
Dmitriy Novozhilov
2019-03-07 14:13:28 +03:00
parent d0462859bf
commit 77c98bef4d
13 changed files with 137 additions and 14 deletions
@@ -1,2 +0,0 @@
CASES: 4
java.lang.StackOverflowError
@@ -31,12 +31,10 @@ fun case_3(): Boolean {
/*
* TESTCASE NUMBER: 4
* UNEXPECTED BEHAVIOUR
* ISSUES: KT-26386
* EXCEPTION: compiler
*/
fun case_4(): Boolean? {
contract { returns(null) implies case_4() }
contract { returns(null) implies <!ERROR_IN_CONTRACT_DESCRIPTION, TYPE_MISMATCH!>case_4()<!> }
return null
}