Mark Punzalan
c3d2ce0c1f
FIR checker/IDE: Add checker and quickfix for WRONG_MODIFIER_TARGET.
...
There are only simple checks for `external` and `const` for now. The
rest of the checks (see ModifiersChecker in FE1.0) will be added later.
2021-03-17 10:45:26 +01:00
Yaroslav Chernyshev
d053ee33a8
Precise platform importing changes ported from new repository
2021-03-15 13:35:35 +03:00
Dmitry Savvinov
1143865e88
Minor: add test on importing platform of commonMain in single-backend project
2021-03-15 13:35:32 +03:00
Ilya Kirillov
4e98d1b857
FIR IDE: update lazy resolve tests testdata
2021-03-12 11:44:00 +01:00
Ilya Kirillov
ded234074d
FIR: render value parameter/lambda/accessor resolve phase if RenderMode.renderDeclarationResolvePhase is enabled
2021-03-12 11:43:59 +01:00
Mark Punzalan
bb790195a2
FIR IDE: Enable ChangeVariableMutabilityFix for MUST_BE_INITIALIZED.
2021-03-11 16:31:40 +01:00
Pavel Kirpichenkov
4bc019736b
[MPP] Add KotlinSDK to the set of predefined test SDKs
...
^KT-45145 Fixed
2021-03-09 20:05:32 +03:00
Ilya Kirillov
0130ecd21d
FIR IDE: fix CCE in getKtExpressionType on assignment target
2021-03-07 19:48:08 +01:00
Tianyu Geng
8158a07063
FIR IDE: add quickfix for NESTED_CLASS_NOT_ALLOWED
2021-03-05 13:27:36 +01:00
Jinseong Jeon
e009b71f88
FIR checker: report uninitialized member/extension properties
2021-03-04 17:56:29 +03:00
Tianyu Geng
17617ffd3f
IDE FIR: fix resolving vararg parameter type
...
For a vararg parameter type, there corresponding FIR element has a fake
source of kind ArrayTypeFromVarargParameter. As a result,
`getOrBuildFir` returns the whole `FirValueParameter` for the parameter
type reference. Therefore, we need some special handling for this case
in order to resolve the proper `KtSymbol`.
2021-03-02 12:46:55 +01:00
Tianyu Geng
bca393bd5c
FIR IDE: Add quickfix for PRIVATE_SETTER_FOR_(OPEN|ABSTRACT)_PROPERTY
2021-03-01 19:30:31 +01:00
Roman Golyshev
6ebd4b954c
Add new reference resolve tests
...
The main purpose is to show that old frontend and FIR work differently
in the case of the conflicts of local and top level classes/objects
See the tests that marked with // IGNORE_FIR
Corresponding ticket is ^KT-45192
2021-03-01 10:23:57 +00:00
Dmitry Savvinov
168c692a27
Use overriding util with proper typechecker for overriding in LazyClassMemberScope
...
Note that LazyClassMemberScope actually has a separate field for
KotlinTypeRefiner, and it might be actually different from the one in
c.kotlinTypeChecker.
The one in c.kotlinTypeChecker is the refiner of *owner* module, i.e. a
module in which the class has been declared. If we have a class Foo :
Expect in common, then the refiner will be from common, and thus it
won't be able to refine supertypes to their platform-dependent values.
The one passed in constructor is actual refiner of dependant-module.
Say, if we're looking at Foo from the point of view of jvmMain, then
we'll create a (view-dependent) LCMS for that, and it will contain
refiner for jvmMain.
It is important to use proper refiner, otherwise the idea of having
"module-dependent view" breaks, and we might suddenly mismatch some
overrides with expect-classes in their signatures.
^KT-44898 Fixed
2021-02-26 12:37:01 +03:00
Dmitry Savvinov
9616eb94fd
Add test on KT-44898 (MPP + type refinement + complex inheritance)
...
The current behaviour is undesired (ABSTRACT_MEMEBER_NOT_IMPLEMENTED
reported on class Concrete), will be fixed in the next commit
2021-02-26 12:37:01 +03:00
Ilmir Usmanov
2523ea1ef4
Do not add @JvmInline annotation on JS and Native
2021-02-25 16:07:00 +01:00
Ilmir Usmanov
2df049fc03
Minor. Remove outdated test and update maven test
2021-02-25 16:06:58 +01:00
Ilmir Usmanov
8c31fcb615
Add inline class -> @JvmInline value class intention
2021-02-25 16:06:54 +01:00
Mark Punzalan
1c94372b6c
FIR checker/IDE: Add checker and quickfix for VAL_WITH_SETTER.
2021-02-25 13:06:53 +01:00
Dmitriy Novozhilov
4222bb9af2
[FE] Make whens on expect sealed classes and enums not exhaustive
2021-02-25 14:56:08 +03:00
Tianyu Geng
aec498a4ea
Add quickfixes for NON_FINAL_MEMBER_IN_FINAL_CLASS
2021-02-24 15:56:35 +01:00
Toshiaki Kameyama
ee406f1622
Lift assignment out: if last statement is lambda, enclose it in parentheses if necessary
...
#KT-38155 Fixed
2021-02-22 17:40:06 +01:00
Ilya Kirillov
141b6b0e55
FIR IDE: use different .after testdata for AbstractHLIntentionTest.kt
2021-02-19 16:44:50 +01:00
Tianyu Geng
56854a8b1a
FIR IDE: register quickfix for the following
...
1. NON_ABSTRACT_FUNCTION_WITH_NO_BODY
2. ABSTRACT_PROPERTY_IN_NON_ABSTRACT_CLASS
3. ABSTRACT_FUNCTION_IN_NON_ABSTRACT_CLASS
2021-02-19 13:16:42 +01:00
Vladimir Dolzhenko
8783ebc352
Report highlight errors to WolfTheProblemSolver
...
Relates to #KT-37702
#KTIJ-1246 Fixed
Original commit: bd222a5255c2fd6f4abfce3115f81733ef9a39f3
2021-02-19 05:46:04 +00:00
Ilya Kirillov
e8f3ebdd19
FIR IDE: introduce HLRedundantVisibilityModifierInspection by extended checker
2021-02-16 15:23:18 +01:00
Mark Punzalan
706d3e5aa8
FIR IDE: Add quickfix for VAR_ANNOTATION_PARAMETER.
2021-02-15 21:07:32 +01:00
Mark Punzalan
4e44804c77
FIR IDE: Add quickfix for INAPPLICABLE_LATEINIT_MODIFIER.
...
Also changed FE1.0 checker and all related fix factories to report error
on the declaration instead of the lateinit modifier. This is consistent
with the direction of all checkers in FIR (no reporting on modifiers).
2021-02-15 19:37:14 +01:00
Andrei Klunnyi
53a7dc1126
KT-44839 [Sealed interfaces]: restore move-tests for lang-version < 15
...
This commit restores tests removed in 690fb47c .
2021-02-15 15:28:00 +00:00
Ilya Kirillov
d42cc219bf
FIR IDE: fix collecting diagnostics for raanalysable non-toplevel declarations
2021-02-12 15:25:14 +01:00
Roman Golyshev
8020424b93
FIR IDE: Remove fake root prefix even when the element is not shortened
2021-02-12 10:53:17 +00:00
Roman Golyshev
ee98a76600
FIR IDE: Implement simple importing of the functions
...
This is not a complete algorithm, but it already works in many cases
Disable some tests that not yet work
2021-02-12 10:53:16 +00:00
Roman Golyshev
51c59e5634
FIR IDE: Check function call before trying to drop the receiver
2021-02-12 10:53:14 +00:00
Roman Golyshev
d88fd5bd73
FIR IDE: More strictly navigate to parent KtDotQualifiedExpression
2021-02-12 10:53:14 +00:00
Roman Golyshev
e265a78a33
FIR IDE: Implement shortening and import for type qualifiers
2021-02-12 10:53:13 +00:00
Roman Golyshev
0e271b72c7
FIR IDE: Do not try to shorten type without qualifier
2021-02-12 10:53:12 +00:00
Roman Golyshev
534f4a66ad
FIR IDE: Add simple shortening for qualified calls and properties
2021-02-12 10:53:12 +00:00
Roman Golyshev
f03ca5ea57
FIR IDE: Add import in case when conflicting class comes from * import
2021-02-12 10:53:11 +00:00
Roman Golyshev
0b48416a1e
FIR IDE: Unwrap nullable types
2021-02-12 10:53:10 +00:00
Roman Golyshev
08e271411f
FIR IDE: Create fake scopes to avoid import duplicates
2021-02-12 10:53:09 +00:00
Roman Golyshev
e34370554d
FIR IDE: Add simple types importing
...
Some tests are not passing
2021-02-12 10:53:09 +00:00
Roman Golyshev
8575ce32d4
FIR IDE: Add more tests for type conflicts
2021-02-12 10:53:07 +00:00
Roman Golyshev
e744084c15
FIR IDE: Enable types shortening for nested classes and nested types
2021-02-12 10:53:07 +00:00
Roman Golyshev
b9d074051f
FIR IDE: Add separate tests for FIR reference shortening
2021-02-12 10:53:06 +00:00
Roman Golyshev
108395fcfe
FIR: Fix bug with incorrect source element for qualifiers
2021-02-12 10:53:04 +00:00
Dmitriy Novozhilov
f3a8fcaea6
[FE] Make constructors of sealed classes protected instead of internal
2021-02-12 13:36:38 +03:00
Mark Punzalan
7962224804
FIR IDE: Add quickfix for VAR_OVERRIDDEN_BY_VAL.
2021-02-11 11:11:00 +01:00
Ilya Kirillov
91e135888d
FIR IDE: introduce HLSpecifyExplicitTypeForCallableDeclarationIntention and HLRedundantUnitReturnTypeInspection
2021-02-09 17:15:41 +01:00
Ilya Kirillov
e269b1d19d
FIR IDE: temporary mute failing tests
2021-02-09 17:15:32 +01:00
Ilya Kirillov
d72a2d39da
FIR IDE: ignore not passing quickfixes tests
2021-02-09 17:15:31 +01:00