This change affects nothing, because @Serializable is checked during
COMPILER_REQUIRED_ANNOTATIONS when typealiases
are not yet resolved, but in case we change something
in the Future and want to support it, we'd have one less problem
Now the plugin-related compiler arguments are respected then used in
the compiler configuration (only in the static part, not supported
if set in a refinement callback)
Note that the "embeddable" version of the plugin should be used if
embeddable compiler is used.
#KT-54095 fixed
- Move out getAnalyzerServices from FirFrontendFacade to TestSetupUtils
- Simplify DependencyListForCliModule. Now it takes BinaryModuleData as input
- FirOutArtifact contains several FirOutputArtifactPart
- Simplify FirFrontendFacade
In particular, JVM IR doesn't provide KtFile for a multifile facade in
JvmDeclarationOrigin (JVM backend provides KtFile of a random multifile
part). This led to multifile classes being completely ignored in the
JVM_IR version of kapt. Now they are generated correctly and the changed
test passes, but there's a _ir.txt expectation file because the order of
'foo' and 'bar' is different (which is not a problem).
This is a hack to implement KT-32596 in the JVM IR version of kapt.
Basically we allow psi2ir to generate annotations whose classifier is
error class, which happens when it's unresolved. Because there's no
physical IR for an error class, we create stub IR for it via
SyntheticDeclarationsGenerator in case we'll need it.
With this hack, annotations with unresolved classifiers magically
survive all the way until the codegen (with a minor change in
IrBasedDescriptors) where they are generated as
`@error.NonExistentClass`, which then gets corrected by the kapt's
"correct error types" mode as in all other cases of error types.
Use the property as PSI element origin for delegated property accessors
and field in JVM IR as it is done in the old JVM backend. Otherwise kapt
"correct error types" mode can't find the property type and thus cannot
succeed in "resolving" it, which led to java.lang.Object being used as a
fallback.
Note that in the unmuted test, .txt and _ir.txt dumps differ only in an
unrelated NotNull annotation on a delegate field.
See also KT-37586 for some related changes which fixed this problem
initially in kapt.
`FirDeclarationGenerationExtension.generateClassLikeDeclaration` was split
into two functions: one for generating top level classes, and one for
nested classes. Such change reduces verbosity and error-proness of
this extension and also allows to smoothly run plugins on local classes
^KT-55248 Fixed
When using correct error types and there is a property setter or
receiver for an unknown type then the parameter type would be `Object` instead
of the error type.
This fixes KT-46965 and KT-46966
Previously the annotations were included in reverse order. With this
change they are kept in the same order as in the source file.
This changes the test case for KT-23427 but that issue seems to relate
to annotation arguments that are missing, not the order of repeatable
annotations.
This fixes KT-51087
as it may have no primary constructor (only actual class has it).
Refactor & rename Fir2IrGeneratorUtils.kt as having 'Fir' in stacktrace
when actual K2 compiler is not used is very confusing.
Fixes https://github.com/Kotlin/kotlinx.serialization/issues/2134
#KT-55683 Fixed
Name check was forgotten during refactoring, so any user function with
matching signature could be overwritten by the plugin, while correct
function would not have body.
#KT-55682 Fixed