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
If the right-hand side of an equality comparison contains an assignment
to the variable used in the left-hand side, then implications about the
equality comparison within data-flow analysis cannot be applied, as the
value of the variable will be different after the comparison.
^KT-55096 Fixed
that causes flaky tests because the default positioning strategy
was dependent on the order of the reported messages.
The code led to it was introduced in an attempt to extract common
PSI-independent strategy because PSI is leaking into the abstract
diagnostic infrastructure. The approach is definitely problematic,
but to fix it now, the leaking dependency to the psi-based module
is introduced. This should be fixed in the future by introducing
better abstractions.
Fixes flaky tests touched in the commit.
#KT-63002 fixed
This test can be used to make small performance measurements of
the core commonizer on occasional basis. This test is not intended
for regular execution, e.g. at the CI server.
^KT-63159
"data objects" is only available since language version 1.9. But we should not use LV 1.9, because it is used in the Gradle build classpath and would be incompatible with Gradle Kotlin runtime.
Then only manually override equals/toString/ works here.
#KT-61657 Fixed
Merge-request: KT-MR-12759
Merged-by: Dmitrii Krasnov <Dmitrii.Krasnov@jetbrains.com>