This testdata was written when there was no "operator" modifier.
After a83225218f rules for operators become stricter and now functions without operators are not considered as such
The root problem is the fact that ConstantExpressionEvaluator returns
null for values such as infinity and NaN loaded from cls psi (see
IDEA-207252). This commit simply reverts a part of 8ab9226805 where we
started to compute default values more often than needed. In
LazyJavaClassMemberScope, we only need to check whether or not there
_is_ a default value, not compute its value.
#KT-29792 Fixed
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
Introduce LightMemberOriginForCompiledElement which holds logic for finding corresponding decompiled declaration
ByJvmSignatureIndexer stores the required information while building decompiled text
Some are unsolved in this commit:
- constructors
- @Jvm* and other unregular generated members
- annotation methods
#KT-11678 Fixed
Instead of .kotlin_class and .kotlin_package files, .kotlin_builtins files are
now supported: they are decompiled to a long file consisting of all non-real
classes (those which do not also have .class files) and members in the
corresponding package.
Unlike the old files, .kotlin_builtins files have a binary version in the
beginning, which allows us to skip decompilation and stub building in case the
file has an unsupported version. This could previously lead to exceptions, see
KT-11077, EA-79339.
The change in DecompiledTextFactory is needed because without "defined in ..."
the keys for members in the long decompiled file are not unique, as there are
multiple members with exactly the same signatures in different classes (e.g.
arithmetic operations in primitive classes).
Remove testData files with the decompiled text and stubs of built-in symbols
because now that the whole package is decompiled to a single file, it would be
painful to update these files each time something in built-in sources changes
#KT-11077 Fixed
- locals win
- unary calls to plus/minus are not supported in favor of unaryPlus/unaryMinus
- unqualified nested classes are temporarily reported as unresolved
- function without receiver win against extension function
- explicit import win against star import