Commit Graph

5 Commits

Author SHA1 Message Date
Dmitry Savvinov f90b29c2e3 Support contracts in PartialBodyResolveFilter
Previously, PartialBodyResolveFilter didn't know about contracts and was
filtering out calls of such functions, leading to unstable completion in
cases like that:

fun test(x: Any?) {
    require(x is String)
    x.<caret>
}

However, PartialBodyResolveFilter works by pure PSI, while to determine
if function has a contract we have to resolve it.

To solve it, we do something very similar to what has been done with
Nothin-returning functions: introduce
KotlinProbablyContractedFunctionShortNameIndex, which collects all
function which *may* have a contract during indexing.

^KT-25275 Fixed
2018-07-27 16:59:24 +03:00
Valentin Kipyatkov 8f32a6c1f9 Partial body resolve test to test 2 resolve modes 2014-12-18 15:48:27 +03:00
Valentin Kipyatkov 6cb6a907d7 Changed test output from line comments to block comments 2014-11-24 20:11:29 +03:00
Valentin Kipyatkov cd90ab951f Partial body resolve tests: more informative test output 2014-11-24 20:11:27 +03:00
Valentin Kipyatkov a675b5ba38 Basic implementation of partial body resolve 2014-11-24 20:11:23 +03:00