Kirill Rakhman
1eb18f13bd
FIR: Fix test data after making LHS of assignment an expression
...
KT-54648
2023-01-31 08:39:43 +00:00
Ilya Kirillov
1bbcae5ed2
[FIR] fix resolve contract violation from scopes
...
We cannot call lazy resolve to STATUS phase from scopes as scopes may be accessed on a STATUS phase or earlier
^KT-54890
^KTIJ-23587 fixed
2023-01-13 21:32:51 +00:00
Dmitriy Novozhilov
b174bb8844
[FIR] Update testdata after introducing FirResolvedErrorReference
2022-12-15 12:12:19 +00:00
Ilya Kirillov
644d1bf0d0
[FIR] ignore tests which fail because of resolve contracts violation
2022-12-12 16:21:07 +00:00
Dmitriy Novozhilov
f3da26946b
[FIR] Change priority of K2_VISIBILITY_ERROR CandidateApplicability
...
In K1 analogue of `K2_VISIBILITY_ERROR` is `K1_RUNTIME_ERROR`, so
candidates with `K2_VISIBILITY_ERROR` should win over innaplicable
candidates with `INAPPLICABLE`, `INAPPLICABLE_ARGUMENTS_MAPPING_ERROR`
or `INAPPLICABLE_WRONG_RECEIVER` applicability
This is needed to allow resolution to invisible symbols (and later
suppress error with `@Suppress("INVISIBLE_SYMBOL", "INVISIBLE_REFERENCE")`
^KT-55026 Fixed
^KT-55234
2022-12-09 12:02:05 +00:00
Nikolay Lunyak
fcd3e4f4c5
[FIR JS] KT-51740: Alter positioning of NO_VALUE_FOR_PARAMETER
2022-09-30 21:39:20 +03:00
Ivan Kochurkin
6c4dafc23c
Disable IgnoreNullabilityForErasedValueParameters for indefinite time, ^KT-53751 Fixed
2022-09-13 16:45:06 +00:00
Ilya Chernikov
bb996c1b27
Switch kotlin version to 1.8
...
with appropriate fixes in testdata, tests and other
places.
2022-06-29 10:20:30 +02:00
Denis.Zharkov
41dd00c241
FIR: Use outer scope for annotation arguments resolution
...
^KT-41980 Fixed
2022-06-06 15:18:05 +03:00
Victor Petukhov
27fa632630
[FE 1.0] Update test data with new error type representation
2022-03-23 21:13:33 +00:00
Vladimir Dolzhenko
918a91dbdf
Escape special names with backticks in test data
...
#KT-51248
2022-02-10 21:20:47 +00:00
Dmitriy Novozhilov
c80cfb0fdb
[FIR] Replace single supertype scope with list of scopes of supertypes in use site scopes
...
This big refactoring is needed to cleanup building of overrides
mappings and prevent creating redundant intersection overrides in
cases when there is no need in them:
```kotlin
interface A {
fun foo()
}
interface B {
fun foo()
}
interface C : A, B {
override fun foo()
}
```
Before this refactoring there was next override tree:
C.foo
intersection override (A.foo, B.foo)
A.foo
B.foo
Also this commit fixes special mapping of overrides in jvm scopes
for declarations which have kotlin builtins in supertypes with
special java mapping rules (collections, for example)
2022-01-19 15:24:43 +03:00
Tianyu Geng
18f7a760bb
FIR checker: report unresolved reference in imports
...
Compared to FE1.0, instead of using UNRESOLVED_REFERENCE, a new
UNRESOLVED_IMPORT diagnostic is introduced. This is so that we can use a
different positioning strategy to highlight the last part of the import
if the entire import is passed.
Also, this change fixed some incorrectly rejected imports in FIR. Such
cases are covered the newly added test file staticFunAndPropertyImport.kt
2021-12-01 23:45:18 +03:00
Dmitriy Novozhilov
8707be51c9
[FIR] Report errors about invisible types from type resolution
2021-11-26 11:26:17 +03:00
Ivan Kochurkin
f046f2964b
[FIR] Add PLATFORM_CLASS_MAPPED_TO_KOTLIN
2021-11-24 23:13:41 +03:00
Nikolay Lunyak
2fb066e261
KT-47101: Fix companion supertypes
2021-11-15 13:22:38 +00:00
Denis.Zharkov
fba44759c0
FIR: Refine visibility check for class members
2021-10-20 22:05:23 +03:00
Ivan Kochurkin
75b40e4b75
[FIR] Add INVISIBLE_SETTER
2021-10-03 17:10:06 +03:00
Ivan Kochurkin
dd46c36b24
[FIR] Add SUBCLASS_CANT_CALL_COMPANION_PROTECTED_NON_STATIC
2021-09-13 20:48:54 +03:00
Mikhail Glukhikh
881b15a677
FIR: use typeWithStarProjections for protected visibility check
2021-08-31 17:32:02 +03:00
Mikhail Glukhikh
08e498f1f2
FIR: add proper receiver check for protected visibility #KT-48378 Fixed
2021-08-31 17:31:57 +03:00
Ivan Kochurkin
84c5f58cab
[FIR] Implement UNRESOLVED_REFERENCE_WRONG_RECEIVER
2021-08-25 21:53:23 +00:00
Ivan Kochurkin
2c1c24c042
[FIR] Implement WRONG_MODIFIER_CONTAINING_DECLARATION, DEPRECATED_MODIFIER_CONTAINING_DECLARATION
2021-08-13 18:32:28 +03:00
Ivan Kochurkin
cd6384eb20
[FIR] Fix handling of WRONG_MODIFIER_TARGET
...
Implement DEPRECATED_MODIFIER, DEPRECATED_MODIFIER_FOR_TARGET, REDUNDANT_MODIFIER_FOR_TARGET
2021-08-13 18:32:27 +03:00
Dmitriy Novozhilov
d17f984edf
[FE 1.0] Migrate most of warning/error pairs to DiagnosticFactoryForDeprecation
2021-08-03 00:17:33 +03:00
Ivan Kochurkin
afb85026c4
Revert "[FIR] Implement INVISIBLE_SETTER"
...
This reverts commit b3d7ed56
2021-08-02 20:10:22 +03:00
Ivan Kochurkin
b3d7ed569d
[FIR] Implement INVISIBLE_SETTER
2021-07-30 18:07:34 +03:00
Ivan Kochurkin
d4e1cded59
[FIR] Implement RESOLUTION_TO_CLASSIFIER
2021-07-28 23:18:38 +03:00
Dmitriy Novozhilov
7b5a5f5682
[FE 1.0] Report USELESS_IS_CHECK if is expression is always false
...
^KT-47684 Fixed
2021-07-13 10:35:01 +03:00
Andrey Zinovyev
b44785c24e
[FIR] NOTHING_TO_OVERRIDE diagnostic
2021-07-08 18:13:47 +03:00
Tianyu Geng
32f55a2269
FIR checker: report VIRTUAL_MEMBER_HIDDEN
2021-06-09 16:27:49 +03:00
Andrey Zinovyev
14789cb9e5
[FIR] Implement CANNOT_BE_IMPORTED diagnostic
2021-06-08 08:18:54 +00:00
Andrey Zinovyev
bf153ab0f0
[FIR] Implement CANNOT_ALL_UNDER_IMPORT_FROM_SINGLETON diagnostic
2021-06-08 08:18:54 +00:00
Ivan Kochurkin
c4c2fbb5a0
[FIR] Implement RECURSIVE_TYPEALIAS_EXPANSION, CYCLIC_INHERITANCE_HIERARCHY diagnostics, fix stackoverlow exception in case if typealias points to type with type arguments
2021-06-03 20:41:58 +03:00
Denis.Zharkov
ddbdfafa79
Remove OI/NI attributes from test data
2021-05-25 13:28:27 +03:00
Denis.Zharkov
2ecba6ac39
Remove WITH_NEW_INFERENCE directive from all tests
...
This directive anyway does not make test run twice with OI, and with NI
It only once run the test with specific settings (// LANGUAGE)
and ignores irrelevant (OI or NI tags)
2021-05-25 13:28:26 +03:00
Denis.Zharkov
00821bbc63
FIR: Update test data (repeated diagnostics)
...
They are a bit redundant, but it needs additional work to be done
to avoid them
2021-05-20 17:24:33 +03:00
Mikhail Glukhikh
0f9f63400e
FirSupertypesChecker: implement six more diagnostics
2021-05-13 16:13:43 +03:00
Dmitriy Novozhilov
32c3f85679
[FIR] Add inline checker for bodies of inline functions
...
This checker doesn't support `@PublishedAPI` yet, so some BB tests for it
were muted. #KT-46270
2021-04-27 18:39:09 +03:00
pyos
e6d923f65c
FIR: rename HIDDEN to INVISIBLE_REFERENCE
...
Some of them should be INVISIBLE_MEMBER though
2021-04-21 16:18:21 +03:00
vldf
24f1f1221e
Introduce FirInitializerTypeMismatchChecker
2021-04-13 21:36:31 +03:00
Mikhail Glukhikh
f0ff9ad5a7
FIR: rename AMBIGUITY to OVERLOAD_RESOLUTION_AMBIGUITY to match FE 1.0
2021-04-02 16:22:01 +03:00
Tianyu Geng
761a0a7d0d
FIR checkers: report specific errors instead of INAPPLICABLE_CANDIDATE
...
Specifically, the report the following 4 errors.
* NON_VARARG_SPREAD
* ARGUMENT_PASSED_TWICE
* TOO_MANY_ARGUMENTS
* NO_VALUE_FOR_PARAMETER
Also added/updated the following position strategies.
* NAME_OF_NAMED_ARGUMENT
* VALUE_ARGUMENTS
2021-04-02 14:36:14 +03:00
Dmitriy Novozhilov
cd890d5833
[Test] Disable UNUSED_* diagnostics in tests which are not belong to contolFlowAnalysis suite
2021-03-29 16:12:29 +03:00
Tianyu Geng
fb14b03824
FIR checker: skip error named reference if receiver is unresolved
...
Currently, FIR reports errors caused by previous resolution failure. For
example with unresolved `a` and `b` in code `a.b`, both `a` and `b` are
highlighted. FE1.0 only highlights `a` since it's the root cause. This
change applies this heuristics when reporting FirDiagnostics.
2021-03-29 12:45:27 +03:00
Jinseong Jeon
c5cabce2d5
FIR: check visibility properly for CANNOT_CHANGE_ACCESS_PRIVILEGE
2021-03-01 16:57:51 +03:00
Mikhail Glukhikh
5892646a27
Change FirQualifiedAccess source to KtQualifiedExpression (if any)
2021-02-19 18:24:45 +03:00
Jinseong Jeon
bd37badf29
FIR checker: add diagnostics for backing fields
2021-02-10 12:29:34 +03:00
Jinseong Jeon
ca314c5bb9
FIR checker: add diagnostic CANNOT_WEAKEN_ACCESS_PRIVILEGE
2021-02-03 12:07:36 +03:00
Jinseong Jeon
3a07ca4c64
FIR checker: add diagnostic VAR_OVERRIDDEN_BY_VAL
2021-02-03 12:07:36 +03:00