'equals' from any made available for overriding in inline classes
'typed' equals made available for definition in inline classes
'typed' equals definition made compulsory if 'untyped' is overridden
'operator' keyword is allowed in 'typed' equals definition
^KT-24874: Fixed
E.g. when substituting T -> Array<T>, write the bytecode for the
Array<...> part for typeOf.
This fixes various issues where either Array nesting levels, nullability
information (for typeOf), or entire reification markers were missing,
causing incorrect outputs ranging from missing `?`s to missing `[]`s to
just reified types not really being reified.
^KT-53761 Fixed
If the super class is in a file that has already been lowered, the base
method has an extra continuation parameter which breaks things.
Also, SAM wrappers around functional objects are tail-call and do not
need continuations ever, so don't even try.
^KT-50950 Fixed
The previous attempt stopped this code from throwing an exception during
serialization, but the arity is still wrong so an exception is now throw
when reading the serialized type.
^KT-50997 Fixed
Review: https://jetbrains.team/p/kt/reviews/6753
Meaningful semantic change was splitted into 5 commits to simplify the
change review. Sinle commit would be too big.
Why replace source to binary: to get rid of kotlin-reflect in Kotlin
plugin artifact KTIJ-22276
Note: Kotlin Maven artifacts (./gradlew publish) changed their
dependency on kotlin-reflect
Corresponding lowering creating wrappers from JS Backend was used.
Also, the lowering was changed to create local function, instead of
normal one in outer scope, as a lot of logic from local declarations
lowering should be duplicated otherwise for correct type parameters
handling.
^KT-38535
Ensure that when .entries is accessed from an inline function body
or lambda argument, EntriesMapping are properly generated and used
without excessive mappings and duplicated fields
#KT-53236
* Replace pcollections with ClassValue/ConcurrentHashMap-based caches
* Do not store weak references, instead cache strong references and count on ClassValue to unload the corresponding classloader if necessary
* ConcurrentHashMap does not rely on WeakReference as it's only selected on Android where classloader leaks don't exist
* Update reflect/scripting JDK requirement to Java 8 in order to proceed
#KT-53454
#KT-50705
Merge-request: KT-MR-6788
Merged-by: Vsevolod Tolstopyatov <qwwdfsad@gmail.com>
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.