Ilya Chernikov
65cf941b9b
Remove assertion about dispatch receiver in scripts
...
#KT-42530 fixed
2020-12-21 09:43:44 +01:00
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
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
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
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
f0ab8bc332
Clean up some code in compiler.resolution.common.jvm
2020-12-18 19:32:03 +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
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
Dmitriy Novozhilov
416f17e5ec
[TEST] Drop remaining tests of experimental coroutines
2020-12-16 19:52:31 +03:00
Dmitriy Novozhilov
019cb1485e
[TEST] Extract language feature regex pattern to :test-infrastructure-utils
2020-12-16 19:52:31 +03:00
Dmitriy Novozhilov
4ed2651c1f
[CMI] Rename platforms to attributes in some forgotten places
2020-12-16 19:52:31 +03:00
Dmitriy Novozhilov
e1802fde29
[TD] Update test data after previous commit
2020-12-16 19:52:30 +03:00
Dmitriy Novozhilov
49d9b85950
[TEST] Migrate AbstractFirDiagnosticsWithLightTreeTest to new test runners
...
Also this commit adds AbstractTwoAttributesMetaInfoProcessor which can
be used for reporting diagnostics with two attributes (OI/NI, PSI/Light tree)
2020-12-16 19:52:30 +03:00
Dmitriy Novozhilov
7e9deb7602
[FIR] Fix NPE in light tree source utils
2020-12-16 19:52:30 +03:00
Dmitriy Novozhilov
b048296dca
[FIR] Fix calculating offsets for light tree source elements
2020-12-16 19:52:30 +03:00
Dmitriy Novozhilov
acbc468fdd
[FIR] Add light tree mode to FirAnalyzerFacade
2020-12-16 19:52:30 +03:00
Dmitriy Novozhilov
2aa1cb7451
[TEST] Migrate AbstractDiagnosticsNativeTest to new test runners
2020-12-16 19:52:30 +03:00
Dmitriy Novozhilov
e7f8486078
[TEST] Migrate AbstractDiagnosticsTestWithJvmBackend to new test runners
2020-12-16 19:52:29 +03:00