Alexander Udalov
7d37030095
JVM IR, FIR: add JvmBackendExtension instead of MetadataSerializerFactory
...
This might be a better place for future behavior that should be
abstracted between FE 1.0 and FIR, in JVM IR.
2020-12-20 23:13:48 +01:00
Leonid Startsev
a5ddb1fdf1
Update error about unsupported inline classes
...
Remove unused declarations
2020-12-19 20:34:45 +03:00
Leonid Startsev
272273baed
Support serializable inline classes in IR plugin
...
as well as standard unsigned types.
2020-12-19 20:34:45 +03:00
Leonid Startsev
631a72d14a
Support old serialization runtime versions
...
(where exception signatures weren't changed)
after f671c27f27
2020-12-19 20:34:11 +03:00
Leonid Startsev
f671c27f27
Adapt serialization exceptions constructor calls in legacy JS
...
to signature change
(see https://github.com/Kotlin/kotlinx.serialization/pull/1054
and commit eea4ff33a0 )
2020-12-19 19:18:15 +03:00
Leonid Startsev
18e7a1485c
Additional fix for Compose:
...
directly search for fields in IR class w/o using the symbol table.
Because Compose copies whole IR, fields got referenced incorrectly.
In the end, bytecode generator thinks that this is a field from other
class and creates a synthetic setter, which is prohibited in Java 9+
(Update to non-static final field ... attempted from a different method than <init>)
2020-12-19 19:18:14 +03:00
Ilmir Usmanov
f922ebbfc3
Value classes: Add JvmInlineValueClasses language feature
2020-12-18 17:53:58 +01:00
Victor Petukhov
48d9812d9e
Review fixes around type enhancement and loading type use annotations
2020-12-18 19:32:05 +03:00
Victor Petukhov
9a52863fbd
Report warnings about type mismatches based on freshly supported nullability annotations deeply
2020-12-18 19:32:05 +03:00
Victor Petukhov
d6017420de
Mark freshly supported annotations to use that mark for reporting corresponding warnings
2020-12-18 19:32:05 +03:00
Victor Petukhov
9693ea19fb
Add tests for type enhancement uncluding with compiled java
2020-12-18 19:32:05 +03:00
Victor Petukhov
71ca18e937
Support diagnostic tests with Kotlin against compiled Java
2020-12-18 19:32:05 +03:00
Victor Petukhov
6f8f531d87
Put type enhancement improvements under the compiler flag
2020-12-18 19:32:05 +03:00
Victor Petukhov
857cc92326
Support preference of TYPE_USE annotations to enhance over others like METHOD, FIELD and VALUE_PARAMETER to avoid double applying them in case of arrays: @NotNull Integer [] (both to the array element and to the entire array)
...
^KT-24392 Fixed
2020-12-18 19:32:04 +03:00
Victor Petukhov
69f31afecc
Exclude tests for loading type use annotations and type enhancement based on them to pass using javac and psi class files reading
2020-12-18 19:32:04 +03:00
Victor Petukhov
f389654fea
Support type enhancement for super classes' types
2020-12-18 19:32:04 +03:00
Victor Petukhov
276498793f
Support enhancement of type parameter's bound for all nullability annotations
2020-12-18 19:32:04 +03:00
Victor Petukhov
c91301d04c
Support type use annotations on fields
2020-12-18 19:32:04 +03:00
Victor Petukhov
b0debbe4c9
Add forced mark "isDeprecated" as false for missing types among javac types
2020-12-18 19:32:04 +03:00
Victor Petukhov
8777d28228
Use new jetbrains annotations with type use target for "load java 8" tests
2020-12-18 19:32:04 +03:00
Victor Petukhov
6f64e2c036
Avoid a cycle of analysing of type parameters via checking that it's a type parameter first
2020-12-18 19:32:04 +03:00
Victor Petukhov
a89329e077
Support reading from class files of the type use annotations on type parameters and type arguments
...
^KT-11454 Fixed
2020-12-18 19:32:03 +03:00
Victor Petukhov
0833719a79
Support annotations on array types
...
^KT-24392 Fixed
^KT-18768 Fixed
2020-12-18 19:32:03 +03:00
Victor Petukhov
f0ab8bc332
Clean up some code in compiler.resolution.common.jvm
2020-12-18 19:32:03 +03:00
Igor Yakovlev
63aa809280
[FIR IDE] Add fir type annotations test
2020-12-18 14:28:27 +03:00
Igor Yakovlev
c4b708b5dc
[FIR IDE] Fixed test data for types
2020-12-18 14:28:27 +03:00
Igor Yakovlev
9e89cfae08
[FIR IDE] Fixed invalid leaks test
2020-12-18 14:28:27 +03:00
Igor Yakovlev
fb94470741
[FIR IDE] Fix resolve value parameter symbol
2020-12-18 14:28:26 +03:00
Igor Yakovlev
8891a337e2
[FIR IDE] Implement type annotations for fir symbols
2020-12-18 14:28:26 +03:00
Igor Yakovlev
9670f67912
[FIR IDE] Make annotations and extension receiver lazy
2020-12-18 14:28:26 +03:00
Jinseong Jeon
9c2d06cf70
FIR: strengthen resolution success check for augmented array set call
...
This commit removes some false ambiguities &
fixes compilation of tree-generator module with FIR
2020-12-18 14:24:24 +03:00
Simon Ogorodnik
9bf2dfaa02
KT-40200: Fix main function detector in lazy resolve overload resolver
2020-12-18 14:19:56 +03:00
Dmitriy Novozhilov
92adccde47
Probably fix issue with creating module descriptor for SDK twice
...
During creation and initialization of module descriptor for sdk
in IdeaResolverForProject.BuiltInsCache.getOrCreateIfNeeded
AbstractResolverForProject asks for sdk dependency for module
descriptor for this sdk, so sometimes this module descriptor was
created twice
#KT-42001 Fixed
EA-211562
2020-12-18 13:40:14 +03:00
Dmitriy Novozhilov
6296f6dc33
[FE] Don't throw assertion in OverrideResolver if directOverridden is empty
...
Those descriptors may be empty in case user made a mistake and tried to
delegate implementation of abstract class instead of interface (and
we don't add functions from abstract class to overriden descriptors
of fake overrides in case of delegation by)
#KT-40510 Fixed
2020-12-18 13:40:14 +03:00
Jinseong Jeon
dea01125d6
FIR deserializer: keep SourceElement for more precise Fir2IrLazyClass's source
2020-12-18 12:17:23 +03:00
Jinseong Jeon
fe0c25693d
FIR2IR: do not convert @ExtensionFunctionType twice
2020-12-18 12:17:21 +03:00
Jinseong Jeon
4608431682
FIR2IR: correct base symbols of fake overrides for delegated member
...
#KT-43984 Fixed
2020-12-18 11:21:02 +03:00
Jinseong Jeon
44c6ec2c44
FIR checker: make unused checker handle invoke properly
...
#KT-43688 Fixed
2020-12-18 09:46:39 +03:00
Mikhail Glukhikh
d907c48d9c
Allow KtEnumEntry...RefExpression.referencedElement be nullable
...
This commit fixes KNPE provoked by RemoveExplicitTypeArgumentsIntention
#KT-29735 Fixed
2020-12-18 09:27:18 +03:00
Shagen Ogandzhanian
4f96f9d6a1
[JS IR] Initialize enum fields before accessing them in companion object
...
see https://youtrack.jetbrains.com/issue/KT-43901
2020-12-18 01:54:59 +01:00
Andrei Klunnyi
3eb0745b58
KTIJ-650 [Code completion]: "sealed interface" is for 1.5+ only
2020-12-17 18:28:04 +00:00
Andrei Klunnyi
27ebb6c946
KTIJ-650 [Code completion]: test framework fix
...
This commit fixes test infrastructure issue.
Usage of "COMPILER_ARGUMENTS" test-data-instruction resulted in side
effect. Test cases following the one that used it got broken
LanguageVersionSetting - LanguageFeature.MultiPlatformProjects escaped,
languageVersion could be wrong.
Why it happened
KotlinProjectDescriptorWithFacet defines default values
of (language-version, isMultiplatform) settings for the test-case.
The values themselves are stored in KotlinFacetSettings and passed there
only once. After every test-case (if it uses "COMPILER_ARGUMENTS")
infrastructure calls
KotlinLightCodeInsightFixtureTestCaseKt#rollbackCompilerOptions which
resets mentioned values (among others) in KotlinFacetSettings.
Instances of KotlinProjectDescriptorWithFacet are reused hence facet
settings remained reset.
2020-12-17 18:28:03 +00:00
Andrei Klunnyi
efc7ab5023
KTIJ-664 [SealedClassInheritorsProvider]: test fixes
2020-12-17 19:01:49 +01:00
Nikolay Krasko
88a0fe7ec1
Make a longer description for Kotlin Android plugin
...
Try to overcome `Plugin description must not be generic, please
elaborate.` from the Gradle plugin portal.
2020-12-17 14:30:05 +03:00
Ilya Gorbunov
43c04dfd08
[Wasm] Publish stdlib: remove separate project
2020-12-17 14:13:51 +03:00
Igor Chevdar
be688356c9
[IR] Fixed bug with thread unsafety
...
There is no need in a singleton here
2020-12-17 14:03:52 +05:00
Igor Chevdar
03693e3d5a
[klib] Optimized away some Files.exists()
2020-12-17 13:57:16 +05:00
Dmitriy Novozhilov
f597343d82
[TEST] Fix testdata
2020-12-17 00:33:17 +03:00
Dmitriy Novozhilov
8974d31bb8
[TEST] Fix problem with line separator on windows
2020-12-17 00:33:10 +03:00
Vladimir Dolzhenko
f2fa36f9cb
Split modules scan based if facedSettings can affect api/lang level of module
...
^KTIJ-249 Fixed
Original commit: d280fb1fe466ef7b6ef7559067032033bedefd6e
2020-12-16 21:00:24 +01:00