Commit Graph

3 Commits

Author SHA1 Message Date
Alexander Udalov 9187a85aaf Rename UseExperimental->OptIn, Experimental->RequiresOptIn in quickfix and IDE tests 2020-01-14 21:04:43 +01:00
Dmitry Savvinov 7887bafc5b Minor: update testdata in completion test on contracts 2018-10-18 12:09:10 +03:00
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