Ilya Chernikov
9ee17cd610
Do not throw assertion on recursion in typealias declaration,
...
return empty list of descriptors instead, allowing for proper error
reporting later.
#KT-18344 fixed
2020-12-21 09:43:43 +01:00
Ilya Chernikov
02c617468f
Add support for a callback on recursion for memoized functions
2020-12-21 09:43:43 +01:00
Alexander Udalov
eef06cded3
JVM IR: output stable ABI binaries by default
...
#KT-43592 Fixed
2020-12-20 23:14:54 +01:00
Alexander Udalov
e0593ff70f
Minor, extract CompilerConfiguration.messageCollector to extension property
2020-12-20 23:14:49 +01:00
Alexander Udalov
691b20a685
JVM IR, FIR: set IR configuration key to true if FIR is enabled
2020-12-20 23:14:41 +01:00
Alexander Udalov
06805ffbaa
Change CLI flags for controlling diagnostics for ABI of FIR and JVM IR
...
- Use a more generic `-Xallow-unstable-dependencies` instead of
`-Xallow-jvm-ir-dependencies`
- Change `-Xir-binary-with-stable-abi` to `-Xabi-stability=stable`, with
an additional option to specify `unstable` after a subsequent commit
where JVM IR becomes stable by default
#KT-43592
2020-12-20 23:14:32 +01:00
Alexander Udalov
3f517d7e8d
Add new metadata flag for class files compiled with FIR
...
Report a separate error when class files compiled with FIR are in
dependencies, in addition to the one for class files compiled with FE
1.0 + JVM IR.
#KT-43592
2020-12-20 23:14:30 +01:00
Alexander Udalov
cbd90c3af5
Refactor boolean IR ABI stability flag to enum
...
Introduce an enum DeserializedContainerAbiStability with two values.
This is needed in order to support another reason for ABI instability in
a subsequent commit, namely "unstable because compiled by FIR".
#KT-43592
2020-12-20 23:14:12 +01:00
Alexander Udalov
b7d32a8754
Minor, invert analysis flag that allows unstable dependencies
2020-12-20 23:13:50 +01:00
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