A previous fix to the generator made the generator and checker
validation of classes which could be parcelized different. The checker
would report error in cases where the generator would not generate
anything. Align these checks, with improved code sharing, so errors are
not reported on classes which will not have parcelize components
generated.
^KT-63086 Fixed
This is to record the red->green change in behavior between K1 and K2,
when K2 correctly handles resolution/inference of an extension function
with definitely non-nullable type.
This still doesn't work for unresolved delegate (see analysis/low-level-api-fir/testData/getOrBuildFir/wholeDeclaration/localDelegatedPropertyWithPropagatedType.out_of_src_roots.txt)
^KT-63042
This leads to type ref referring to generic type variables being
serialized correctly.
When the type variable is declared on the member itself, it's written to
typeParameterName,
otherwise it's written to typeParameter. This is required for
deserialization to work correctly.
#KT-63227 Fixed
The relative path of a test file is just its name, even if it's in a
module.
Diagnostics in IR are mapped to the file path and so it's reported on
all files with the same path, i.e. name.
This doesn't happen in production code because no two files can have
the same path.
The proper fix would be to prefix the test files' paths with the module
name.
Unfortunately, this breaks a bunch of test runners that rely on the
current behavior.
Especially, some JS runners turned out to be hard to fix.
The linked YouTrack issue contains a WIP, incomplete patch of fixing
some runners.
#KT-61592 Fixed
#KT-63252
^KT-61955 Fixed
Introduce LV vs don't introduce LV:
introduce LV:
- K1 IDE and K2 project: IDE accurately shows compiler errors
- K2 IDE and K1 project: There are cases when IDE shows red but in reality it's green
don't introduce LV:
- K1 IDE and K2 project: There are cases when IDE shows red but in reality it's green
- K2 IDE and K1 project: There are cases when IDE shows green but in reality it's red
- It became unused after cc70f78027
- And it's not going to become used in the nearest future, since in K2,
we won't have "member scopes" check on frontend (for now)
Usages of this function may lead to potentially error-prone behavior,
so it should be used carefully
There is a probability that this function won't be needed after
KT-62856 will be fixed
See comment to the similar commit about `getOrCreateIrFunction`
There are two added TODOs mentioned KT-62856, without them the following
tests are failing:
- `FirPsiJvmIrTextTestGenerated.FirProblems#testTypeParameterBounds`
- `FirPsiJvmIrTextTestGenerated.Declarations#testKt52677`
`getOrCreateXxx` methods have not very safe semantics: they sometimes
create an IR declaration if it was missing in caches before. For all
source declarations, this is not very good semantic, because we have
strict rules in which order source declarations should be created,
and usage of `getOrCreateXxx` may break this order.
So it's important to be able to track all invocations of such methods
to ensure that it's appropriate in each case.
To achieve that, a new `@GetOrCreateSensitiveAPI ` opt-in is introduced
Frontend may leak captured types into type arguments, so they should be
approximated before using them in fir2ir cast inserter to determine
a specific type from smartcast
^KT-62863 Fixed
The compiler had some code that looked for the same tools and files
in toolchains at different relative paths depending on the platform.
This commit improves that code by including `usr/` into the path to
the toolchain on macOS, which allows to unify the relative paths
inside the toolchains.
Co-authored-by: Johan Bay <jobay@google.com>
This change adds a Native Obj-C launcher that implements XCTestCase
and overrides defaultTestSuite property to provide XCTest with generated
test suites and test cases.
The defaultTestSuite method is essentially a starting point with runtime
initialization. It requires a `Konan_create_testSuite()` method to be
implemented in a Kotlin library that returns a list of XCTestCases.
This launcher should be compiled as a TEST_BUNDLE to be used then with
XCTest.
This commit is a part of ^KT-58928
Co-authored-by: Alexander Shabalin <Alexander.Shabalin@jetbrains.com>
Merge-request: KT-MR-12841
Merged-by: Pavel Punegov <Pavel.Punegov@jetbrains.com>
This is required for some checks on call site, and it seems that
this symbol can cover all cases.
One of the examples why this API was introduced is a request to
distinguish which vararg parameter is missed in arguments
of an annotation call from symbol light classes
^KT-62560