If there is an existing method that will have its argument types
remapped to boxed types, make sure to reflect that in the IR so
that code will be generated for a boxed value instead of a
primitive value.
Updated test checks, that large unsigned numbers are converted to corresponding
negative signed numbers properly. Using unsinged constants instead of signed
in test allows to remove supressed OI error as well as use test with NI.
FakeCallableDescriptorForObject instance, which is not ConstructorDescriptor,
is checked with call checkers when object's contents are being used.
Checker of missing supertypes should not be run against this fake descriptor.
Object's members belong to separate member scope, so their resolution doesn't
force containing class' supertypes evaluation. I.e. object's methods
may work fine even if some supertypes of containing class are missing.
Workaround for JPS build by copying compiler.xml in test runner before tests
For gradle just copy it in the processResourcesTask of idea project
#KT-34528
It allows to fold these blocks and navigate to them in the IDEA.
Also, this commit adds compiler configuration keys to control generating comments with paths for file blocks,
and now generating such comments is enabled only in our tests.
Vararg parameter in reflection type is interpreted as covariant
array type against array in expected functional type and as
vararg element type otherwise. For instance having function
fun foo(vararg args: Int): Unit { /*...*/ }
reference ::foo can be passed against expected
(Int) -> Unit,
(Int, Int) -> Unit, etc.
In none of such cases type for parameter in foo's reflection type
should be changed to array.
However, against expected type (IntArray) -> Unit args' type
must become IntArray.
^KT-25514 Fixed
* Extract replacement of IrGetField/IrSetField into a separate
file-level lowering (should reduce the amount of work to linear in
the number of classes rather than potentially quadratic)
* Extract static backing field construction into JvmDeclarationFactory
and move that lowering after PropertiesToFields lowering to reduce
code duplication
Check worked incorrectly in case when argument type and expected type are the
same intersection type, which is possible for local variables without explicit
type declaration.
For some reason, working without APT requires this call in JavacWrapper.
From the other hand, working without APT does not require
Kotlin class files to be in javac classpath.
Imports resolution is a rather time consuming task and doesn't have
`checkCanceled` on its computation path. So, if a thread is resolving
imports it will do it until the end of computation, which can lead to
unnecessary work and some IDE freezes.
#KT-34990 Fixed