As stated in JavaDoc for 'PsiElement' (formatting is slightly changed):
Returns the reference from this PSI element to another PSI element
(or elements), if one exists. If the element has multiple associated
references, returns the first associated reference.
cbrt() is the standard cubic root function that provides several advantages over pow(x, 1.0/3.0):
- Better precision
- Faster
- Behaves better with negative values
Those functions take `ClassId` and `CallableId`, which is more correct
than using just `FqName`.
Also implement those functions for `Fir2IrPluginContext`
For FE 1.0, we just change super qualifier symbol to
base class, if it's possible.
For FIR, we introduce using of super qualifier symbols for
field accesses and repeat FE 1.0 behavior here.
#KT-49507 Fixed
Consider a function `run2` that has 2 lambda arguments called in place.
We don't know the order in which they're called, so here:
var x: Any? = something
run2(
{ x = null },
{ x as String },
)
// <--
it's not correct to simply `&&` the statements together, as that would
produce `x is Nothing? && x is String && x is Any?`. Instead, statements
should be grouped by assignment first, and different groups are `||`-ed.
This means in the above example we now get `x is Nothing? || (x is Any?
&& x is String)` == `x is String?`.
For example:
foo(
// `if` joins A & B
if (condition)
run { ... } // A
else
run { ... }, // B
run { ... } // C
) // `foo` unifies `A & B` and `C`, so if it is not resolved itself,
// further `if`s, `when`s, safe calls outside it, etc. continue
// building the correct type predicate until the next completed
// call.
^KT-44512 Fixed
This allows to run parameterized tests against combination of different
Gradle and Android Gradle plugin versions.
By default, test is provided with minimal supported Gradle + AGP version
and maximum supported Gradle + AGP version.
Migrate AGP versions to enum with compatibility fields.
^KT-45747 In Progress
On Android devices starting SDK 25, ThreadLocalRandom accidentally
started out from the same seed on all application starts. This
means that the same sequence of numbers is returned whenever the
application is started.
This will be fixed in SDK 34. We should avoid using
ThreadLocalRandom until then.
^KT-52618 Fixed
In DeserializedClassDescriptor and MemberDeserializer, only the
`contextReceiverTypeList` field was used, and not
`contextReceiverTypeIdList` which is used when `-Xuse-type-table` is
enabled. The convention is to use a bunch of utilities declared in
`protoTypeTableUtil.kt` which deal with both methods of reading types.
Also, simplify the deserialization code in FIR (which was correct for
some reason).
Such dependencies will be embedded into plugin jar and their package
will be relocated. This is need to avoid dependency conflicts with
user build scripts dependencies or other Gradle plugins.
Kotlin project dependencies are not shadowed.
^KT-46034 Fixed