Alexander Udalov
8991ce53f4
Regenerate tests
2021-05-13 19:16:09 +02:00
Steven Schäfer
b2378620c3
JVM IR: Fix handling of anonymous initializers in inline classes ( #4372 )
...
Fixes KT-46554
2021-05-13 18:40:26 +02:00
Yan Zhulanow
cc4c61d2b3
Remove dependency on parcelize-runtime in the Parcelize compiler plugin
2021-05-14 01:06:39 +09:00
Yan Zhulanow
e90cc30edb
Remove CLI and some of daemon-related modules from compiler-for-ide
...
These modules is not required by the plugin, and the plugin verifier
warns about unsatisfied dependencies of the modules.
CLI is needed in tests so a separate artifact is created instead.
2021-05-14 01:06:39 +09:00
Yan Zhulanow
26f71c33c0
IDE: Publish JS IR klib artifact
2021-05-14 01:06:39 +09:00
Andrey Zinovyev
58c7aa9937
[FIR] Don't replace custom compareTo with default one in primitives
2021-05-13 18:04:43 +03:00
Mikhail Glukhikh
1a3aa1bff0
FIR: report ANNOTATION_PARAMETER_DEFAULT_VALUE_MUST_BE_CONSTANT
2021-05-13 16:13:44 +03:00
Mikhail Glukhikh
55104a594c
FIR: fix WRONG_GETTER(SETTER)_RETURN_TYPE associated PSI types
2021-05-13 16:13:44 +03:00
Mikhail Glukhikh
0f9f63400e
FirSupertypesChecker: implement six more diagnostics
2021-05-13 16:13:43 +03:00
Mikhail Glukhikh
db828a6aad
Generalize FirInterfaceWithSuperclassChecker to FirSupertypesChecker
2021-05-13 16:13:43 +03:00
Mikhail Glukhikh
632a9d66d1
FIR: introduce isPrimitive / isPrimitiveOrNullablePrimitive helpers
2021-05-13 16:13:42 +03:00
Mikhail Glukhikh
6d82aa0bc9
Drop duplicating FirPropertyAccessorChecker
2021-05-13 16:13:08 +03:00
Mikhail Glukhikh
d2cbf941db
Collect all accessor checks in FirPropertyAccessorChecker
2021-05-13 16:13:08 +03:00
Mikhail Glukhikh
243114ef29
FIR: add 'withSuppressedDiagnostics' call to property checkers
2021-05-13 16:13:08 +03:00
Mikhail Glukhikh
6618b4ea57
FirPropertyAccessorChecker: add three new diagnostics
2021-05-13 16:13:07 +03:00
Dmitriy Novozhilov
1a3b5657c7
[FIR] Fix overload conflicts resolution for callable references with defaults
2021-05-13 15:31:18 +03:00
Alexander Udalov
e3b92fd561
Update instructions to run protoc on Windows and Linux
2021-05-13 13:58:43 +02:00
Alexander Udalov
b5af93c8b4
Fix IR proto backward compatibility for InlineClassRepresentation
...
This is important only if any backend which uses IR serialization will
(accidentally or voluntarily) use `IrClass.inlineClassRepresentation`,
which is missing in IR of klibs serialized with 1.5.20 or earlier.
Note that at the moment only JVM IR is using
`IrClass.inlineClassRepresentation`, but ideally we'd like to change
that (if needed).
2021-05-13 13:58:43 +02:00
Alexander Udalov
0a18174165
IR: remove hack related to inline class representation in lazy IR
...
This commit effectively reverts changes from
b5f9b1dfc0 , fixing the problem from
KT-44723 in a stabler way. It is possible because we now serialize
inline class representation to metadata and after previous changes, we
have that representation as a field in IrClass.
2021-05-13 13:56:59 +02:00
Alexander Udalov
da06faa57e
JVM IR: use inlineClassRepresentation in more utilities
...
Remove any logic related to finding the single parameter of the primary
constructor, and use inlineClassRepresentaton from IrClass or
ClassDescriptor instead.
2021-05-13 13:56:59 +02:00
Alexander Udalov
54befa769f
IR: add IrClass.getInlineClassRepresentation, serialize/deserialize it
...
The change in FirDeclarationUtil is needed because in case of unsigned
types loaded from the standard library, the primary constructor for some
reason is not the first, but the second in the list of constructors.
2021-05-13 13:56:59 +02:00
Alexander Udalov
4c7f207309
Use new getInlineClassRepresentation in some utilities
2021-05-13 13:54:02 +02:00
Alexander Udalov
7fb3f48c67
Add ClassDescriptor.getInlineClassRepresentation
...
This will be used at least in the JVM backend instead of the current
approach where we're loading the primary constructor's first parameter,
which isn't good enough since primary constructor can be private, and
we can't rely on private declarations in case they're declared in
another module.
2021-05-13 13:54:02 +02:00
Steven Schäfer
6aaff9dfb7
JVM IR: Handle overloaded values functions in MappedEnumWhenLowering
...
Fixes KT-46579.
2021-05-13 13:24:32 +02:00
Andrey Zinovyev
5d30576d28
[FIR] Report not-a-constant diagnostics inside function calls
...
When function calls are not fully resolved
2021-05-13 10:15:26 +03:00
Andrey Zinovyev
e74141ded6
[FIR] Properly check spread constant argument
2021-05-13 10:13:21 +03:00
Andrey Zinovyev
07e47140a6
[FIR] Treat unsigned numbers as primitives in constant checker
2021-05-13 10:11:59 +03:00
Roman Golyshev
9cadd1c8a7
Remove IGNORE_FIR from test data of already green test
2021-05-13 03:22:07 +03:00
Pavel Punegov
238ada04c0
Use newer version of Kotlin/Native in the testNativeCompilerDownloading
2021-05-13 03:19:23 +03:00
Yahor Berdnikau
13fd2a24ea
Fix exposing provided by Gradle Kotlin dependencies.
...
Ensure that Gradle plugin dependencies do not include kotlin-stdlib,
kotlin-reflect and other dependencies that are provided by Gradle
runtime.
^KT-41142 Fixed
2021-05-12 23:28:37 +03:00
Steven Schäfer
1198b40c11
Parcelize: Port the fix for KT-41553 to android-extensions
...
Fixes KT-46590.
2021-05-12 21:18:15 +02:00
Ilya Kirillov
4ef81e93ef
FIR IDE: properly implement FirKeywordCompletionContributor.keywordCompletion
2021-05-12 21:40:22 +03:00
Ilya Kirillov
ca320f2f8d
FIR IDE: add this labels to keyword completion
2021-05-12 21:40:20 +03:00
Ilya Kirillov
47a596c214
FIR IDE: add return target to tail in keyword completion
...
The same do FE10 completion and we need it to have consistent tests
2021-05-12 21:40:19 +03:00
Ilya Kirillov
f8fc43f1e9
FIR IDE: add AbstractKeywordCompletionTest
2021-05-12 21:40:18 +03:00
Ilya Kirillov
96117fc1eb
FIR IDE: cleanup FirPositionCompletionContextDetector.detect
2021-05-12 21:40:16 +03:00
Ilya Kirillov
597d64b81d
FIR IDE: do not ignore passing tests from AbstractFirKeywordCompletionHandlerTest
2021-05-12 21:40:15 +03:00
Ilya Kirillov
f18bcdb88c
FIR IDE: add AbstractFirKeywordCompletionHandlerTest
2021-05-12 21:40:14 +03:00
Ilya Kirillov
e5202f44d7
Refactor keyword completion handlers
...
- Separate completion keyword handlers stuff into files
- Introduce CompletionKeywordHandlerProvider as a common way to provide handlers
- Move CompletionKeywordHandler factory out of companion object
2021-05-12 21:40:12 +03:00
Ilya Kirillov
8983bde73e
FIR IDE: implement override completion
2021-05-12 21:40:11 +03:00
Ilya Kirillov
ae212f36f5
FIR IDE: move addElementToCompletion to FirCompletionContributorBase
2021-05-12 21:40:10 +03:00
Ilya Kirillov
e624f2c136
FIR IDE: do not pass resultSet in KotlinWithNameReferenceCompletionProvider as it is already available
2021-05-12 21:40:09 +03:00
Ilya Kirillov
49aba39ae8
Make OverridesCompletionLookupElementDecorator available for FIR IDE
2021-05-12 21:40:07 +03:00
Ilya Kirillov
8f399652d7
FIR IDE: add expressions to return keyword completion
...
Also, adds return targets for return with labels while FE1.0 plugin don't
2021-05-12 21:40:06 +03:00
Ilya Kirillov
8cfa85df6b
FIR IDE: make FirKeywordCompletion to be a completion contributor
2021-05-12 21:40:04 +03:00
Ilya Kirillov
ca1fd185dc
FIR IDE: introduce base class for completion provider
2021-05-12 21:40:03 +03:00
Ilya Kirillov
81c6f38f79
FIR IDE: move context creation out of KotlinFirCompletionContributor
2021-05-12 21:40:02 +03:00
Ilya Kirillov
8eff865277
FIR IDE: encapsulate basic completion parameters into class
2021-05-12 21:40:01 +03:00
Ilya Kirillov
a08c267c37
FIR IDE: mute a few completion tests as they now fails because of unexpected keywords
2021-05-12 21:39:59 +03:00
Ilya Kirillov
98becc9a50
FIR IDE: remove FIR_IGNORE from passing completion test after implementing basic keyword completion
2021-05-12 21:39:58 +03:00