For a box test, the test engine generates a test launcher -- a function
that calls `box` function. The latter might require an opt-in. To deal
with this, the test engine was using some heuristics to detect possibly
used opt-ins and applied them to the test launcher.
This commit provides an alternative solution -- it uses
`@Suppress("OPT_IN_USAGE_ERROR")` annotation for the test launcher. This
way, it doesn't have to guess which opt-ins to apply.
This directive makes the test standalone, i.e. disables grouping it with
other tests into a single compilation, and in particular disables
package renaming for the test.
Also, remove the old hard-coded way to mark tests standalone.
The test engine detected tests using typeOf and made them "standalone",
i.e. disabled test grouping and thus package renaming for them, to keep
the reflection information intact.
Now, with `ReflectionPackageName` annotation, this is not required
anymore.
The test engine renames packages in test files to allow group many tests
into single compilation for performance reasons.
As a result, reflection APIs return different package names. To deal
with this, the test engine uses certain heuristics to detect tests using
reflection APIs, and disables grouping (and thus package renaming) for
them.
This commit provides an alternative solution for the same problem --
now the test engine instructs the compiler to use original package names
for reflection information, by means of the introduced
`ReflectionPackageName` annotation.
Previously, the test engine was copying @file:OptIn annotations from
each file to all the other files inside the same test data, and also was
removing other file annotations in certain cases.
Now it only adds the opt-ins specified with `!OPT_IN` directives, and
doesn't remove anything.
They were compared based on the name of the file only disregarding
the module. Therefore, the test framework would only patch
package declarations for one file with a given name even if there
were multiple files with that name in different packages.
`owner` is a PSI element, it can never be an instance of
`KtConstructorSymbol`
Also, make `MutableCollection` an extension receiver instead of context
receiver for the consistency
The patch fixes the js function signature rules to avoid clashes
between bridge and delegated call. Use overridden symbols dfs of
JsName annotation in order to get the correct bridge name.
^KT-52968 Fixed
The patch fixes lost IC dependencies for inherited class or interface methods.
Especially between a fake override function and its implementation.
Since IrSymbolDeserializer doesn't provide all class methods,
they are collected from the class definitions.
^KT-53063 Fixed
IDE partial resolve allows to drop some statements from resolve,
in particular it can drop some lambda. However, this can lead to the
situation when we have no descriptor for lambda or to incorrect
type checks for its containing block. This commit protects about
this situation