tryRenderStructOrUnion can return null for a struct or union to indicate
that passing it by value to or from C is not supported (e.g. it has
bitfields).
It incorrectly handled the case when passing a nested struct or union by
value was unsupported -- instead of null, it returned incorrect struct
declaration.
As a result, when passing such a complex struct or union by value to or
from C, the backend generated C stubs with syntax errors, which resulted
into obscure compilation error ("unable to compile C bridge").
This commit fixes this case in tryRenderStructOrUnion function, and thus
makes the compilation error message more understandable.
^KT-55030
Those scopes always contain all nested classifiers,
while only some of them are available without
explicit import. There are other, more reliable
scopes (like FirNestedClassifierScopeWithSubstitution)
which are stricter about which classifiers
they recognise as valid
^KTIJ-24684 Fixed
^KTIJ-24662 Fixed
It's not possible to unmute some tests for K2 because it causes testData structure changing
If change testData, NATIVE doesn't work even with `IGNORE_BACKEND`
Before c7bc439661 we did not throw
exception when we could not find line number for element. However,
on synthetic suspend lambdas we do not have line numbers.
If future, when we fix adapted callable references (see KT-55559)
there will be more of them.
#KT-56910 Fixed
Script `scripts/update-bootstrap` takes one argument with new bootstrap
version, updates all required places and commit them with message
"Advance bootstrap to {version}"
Case:
```
options.incrementalAfterFailure = false // assignment operator (a)
options.incrementalAfterFailure.set(false) // equivalent (without) (b)
// (a) works thanks to AssignResolutionAltererExtension
// 'incrementalAfterFailure' is a synthetic Java property
// i.e. getIncrementalAfterFailure()
// Navigation to 'incrementalAfterFailure' (a) doesn't work.
```
By navigation, we mean opening declaration sources. The reason of the
issue lied in sources absence (inability to find them).
In general, sources are available via declaration descriptor.
To find one for a property, one needs to understand expression
kind: read/write/both. Hence, the choice of a getter/setter/both.
Since `=` operator is interpreted as a write type expression, a setter
was searched. Missing one resulted in corrupted navigation.
As a fix we provide getter for the missing setter case.
^KT-56941 fixed
```
java.docsDir = file("src/docs")
```
is a `KtBinaryExpression`. Decision on the assignment validity involves
`AbstractAssignPluginResolutionAltererExtension.hasSpecialAnnotation()`.
The function requires a parent declaration, which in case of a script
is `KtScriptInitializer`.
^KT-56221 fixed