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
Ilya Kirillov
36068d0b94
FIR IDE: reuse keyword completion handlers which do not require resovle
2021-05-12 21:39:57 +03:00
Ilya Kirillov
1f93eb0841
FIR IDE: add basic keyword completion
2021-05-12 21:39:56 +03:00
Ilya Kirillov
62fe3930ff
Move keyword completion stuff to frontend-independent module
2021-05-12 21:39:54 +03:00
Roman Golyshev
d7a91cb05e
Remove IGNORE_FIR directive from already green tests
2021-05-12 16:28:31 +00:00
Roman Golyshev
4adb291a12
Mute failing AutoImportQuickFix tests
2021-05-12 16:28:30 +00:00
Roman Golyshev
03a1439cc0
Make IgnoreTests fail correctly when directive is outdated
...
`Outdated` means green test with `IGNORE_FIR` directive, or
red test with `FIR_COMPARISON` directive
Also, invoke directive insertion only when it is appropriate
2021-05-12 16:28:29 +00:00
Roman Golyshev
22db894076
FIR IDE: Add Add Import quickfix
...
This quickfix can import unresolved types and callables
It currently does not support Java types and is not as advanced as in
the old plugin
Also, enable tests that now pass
2021-05-12 16:28:28 +00:00
Roman Golyshev
3ad9e4cb5c
Use Import instead of action FQN
...
This way test data can be used both in the old plugin and in the
FIR plugin
2021-05-12 16:28:27 +00:00
Roman Golyshev
eadd7ac034
Generate multi-file quickfix tests for FIR plugin
...
Currently generate only for `Import` quickfix
2021-05-12 16:28:27 +00:00
Roman Golyshev
24642a7c9f
Add KtTypeElement.unwrapNullability() extension function
...
Replace similar functions with its usage
2021-05-12 16:28:26 +00:00
Roman Golyshev
cc41592969
Add possibility to compute additional files for IgnoreTests
...
It is more flexible then just passing additional prefixes, since in some
cases test data have some weird naming conventions
2021-05-12 16:28:25 +00:00
Roman Golyshev
e50d643213
Add possibility to use ModuleLibrariesSearchScope in other modules
...
The type is made private to avoid direct usage of it
2021-05-12 16:28:24 +00:00