Marco Pennekamp
b0db0f59b4
[LL FIR] KT-50732 Remove FIR_IDE_IGNORE from K1 spec tests
...
- `FIR_IDE_IGNORE` was already removed from the `.fir.kt` counterparts,
but removing the directive from the `.kt` files had been forgotten.
2023-01-16 15:20:50 +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
1b16d651ae
[FIR] Disambiguate names of files with helpers in spec tests
...
Test framework assumes that there won't be any files with same names
in one test. But there were cases when test declared test file
with same name as one of files with helpers (e.g. `functions.kt`)
2022-12-21 16:30:58 +00:00
Dmitriy Novozhilov
02e327277e
[FIR] Report VAL_REASSIGNMENT on assign to non-local vals
...
In this commit reporting on member properties in init section of class
is not supported (see KT-55528)
^KT-55493 Fixed
2022-12-20 08:12:09 +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
pyos
f485413cfd
FIR DFA: x !is T? => x != null
...
^KT-22996 tag fixed-in-k2
2022-12-08 10:19:27 +00:00
Dmitriy Novozhilov
1b42298025
[FIR] Implement IMPLICIT_NOTHING_*_TYPE diagnostics
2022-11-22 15:46:19 +00:00
Dmitriy Novozhilov
0e84bf2053
[FIR] Don't report ARGUMENT_TYPE_MISMATCH on error types
2022-11-22 15:46:19 +00:00
pyos
6a2d74e211
FIR DFA: generate type implications on all null comparisons
2022-11-22 15:44:28 +00:00
Nikolay Lunyak
c5469d5fb5
[FIR] KT-53988: Report ILLEGAL_SELECTOR for constants as selectors
...
Merge-request: KT-MR-7756
Merged-by: Nikolay Lunyak <Nikolay.Lunyak@jetbrains.com >
^KT-53988 Fixed
2022-11-22 10:54:09 +00:00
pyos
e7b4927b6c
FIR: don't emit SENSELESS_NULL_IN_WHEN when value is always null
...
This case (value is always null) contradicts the error message which says
"Expression under 'when' is never equal to null".
2022-11-10 13:10:58 +00:00
Mikhail Glukhikh
2598ecf23f
Revert "K2: fix internal visibility checks for overrides #KT-53197 Fixed"
...
This reverts commit 166965e559 .
2022-08-05 18:26:59 +02:00
Mikhail Glukhikh
166965e559
K2: fix internal visibility checks for overrides #KT-53197 Fixed
2022-08-03 07:52:14 +00:00
Victor Petukhov
42e71f8c53
Remove explicit enabling the new type inference from test data
2022-07-22 16:03:52 +00:00
Victor Petukhov
224beb24eb
Remove explicit disabling the new type inference from test data
2022-07-22 16:03:51 +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
Ilya Gorbunov
383e814d82
Update FIR spec test data
...
NONE_APPLICABLE instead of UNRESOLVED_REFERENCE_WRONG_RECEIVER
presumably because of the introduction of another `contains` extension overload
2022-06-28 00:08:08 +00:00
Ilya Kirillov
3b55585782
[tests] Fix file path in testdata
2022-04-13 12:53:03 +02:00
Ilya Kirillov
339a51fbc6
[low level api fir] unmute now passing tests
2022-04-13 12:53:02 +02:00
Ivan Kochurkin
c6f52893fb
[FIR] Fix inconsistent RETURN_TYPE_MISMATCH and TYPE_MISMATCH reporting on functions and properties
...
^KT-51203 Fixed
2022-04-05 15:50:43 +00:00
Victor Petukhov
27fa632630
[FE 1.0] Update test data with new error type representation
2022-03-23 21:13:33 +00:00
Dmitriy Novozhilov
ade2307345
[FIR] Fix exponential analysis of augmented array access calls
...
^KT-50861 Fixed
2022-03-11 15:36:05 +03:00
Simon Ogorodnik
d054976389
FIR. Add visibility/deprecation filtering to getFirstClassifierOrNull
2022-03-10 20:42:39 +00:00
Mikhail Glukhikh
53d6ac24e5
Switch kotlin version to 1.7
...
* Change 1.6 to 1.7 constants
* Fix SAFE_CALL_WILL_CHANGE_NULLABILITY for testData
* Change EXPOSED_PROPERTY_TYPE_IN_CONSTRUCTOR_WARNING to EXPOSED_PROPERTY_TYPE_IN_CONSTRUCTOR_ERROR
* Change NON_EXHAUSTIVE_WHEN_STATEMENT to NO_ELSE_IN_WHEN
* Fix testData for SafeCallsAreAlwaysNullable
* Change T -> T & Any in test dumps
* Change INVALID_CHARACTERS_NATIVE_WARNING -> INVALID_CHARACTERS_NATIVE_ERROR
* TYPECHECKER_HAS_RUN_INTO_RECURSIVE_PROBLEM_WARNING -> TYPECHECKER_HAS_RUN_INTO_RECURSIVE_PROBLEM_ERROR
2022-02-25 11:46:27 +00:00
Mikhail Glukhikh
2ac2fa5353
Flatten if chains also in LT FIR
2022-02-15 11:48:54 +03:00
Denis.Zharkov
772579143b
FIR: Change semantics for combination of safe calls and operators
...
^KT-41034 Fixed
2022-02-01 13:12:49 +03:00
Victor Petukhov
72a78eb423
Replace errors with warnings for type checker recursion on delegates
...
^KT-49477 Fixed
2022-01-17 21:27:14 +03:00
Dmitriy Novozhilov
330574cab6
[FIR] Properly support smartcasts on stable when subjects in when conditions
...
^KT-49860 Fixed
2021-11-26 11:26:21 +03:00
Ivan Kochurkin
d0a4ca199d
[FIR] Add UNCHECKED_CAST
...
Regenerate diagnostics code
2021-11-12 15:20:45 +03:00
Ivan Kochurkin
291bc74676
[FIR] Add CANNOT_CHECK_FOR_ERASED
2021-11-12 15:20:43 +03:00
Denis.Zharkov
6e15ee8fea
FIR: Refine callable reference resolution in assignment position
...
synthetic_select<() -> T>(::foo) form allows to select better candidate
than synthetic_select(::foo) with expect type `() -> T`
2021-11-10 22:00:01 +03:00
Dmitriy Novozhilov
f26059a7d3
[FE] Add clear warning about future changes about nullability of safe call with non nullable receiver
...
^KT-46860
2021-10-27 16:28:37 +03:00
Dmitriy Novozhilov
94664694df
[FIR] Prohibit confusing syntax inside when branches
...
^KT-48385
2021-10-21 19:39:46 +03:00
Dmitriy Novozhilov
1513e739c6
[FE 1.0] Prohibit confusing syntax inside when branches
...
^KT-48385 Fixed
2021-10-21 19:39:36 +03:00
Ivan Kochurkin
2e1f455d9c
[FIR] Fix type constraint for type parameter ^KT-45345 Fixed
2021-10-06 21:56:04 +03:00
Victor Petukhov
ee728b6902
Use the new type inference for top-level callable reference resolution
...
^KT-47797 Fixed
^KT-47987 Fixed
^KT-45034 Fixed
^KT-48446 Fixed
^KT-13934 Fixed
2021-09-27 16:12:27 +03:00
Tianyu Geng
05fbed68e2
FIR checker: report PROPERTY_AS_OPERATOR
2021-09-10 07:07:43 +03:00
Tianyu Geng
4915d8dda3
FIR checker: support DUPLICATE_LABEL_IN_WHEN
...
Changes from FE1.0:
1. As discussed previously, no expression evaluation happens during this
check.
2. FE1.0 doesn't check redundant object comparisons.
2021-09-10 07:07:42 +03:00
Dmitriy Novozhilov
1e0878cde0
[FE 1.0] Postpone SafeCallsAreAlwaysNullable till 1.7
...
^KT-46860 Fixed
2021-09-02 13:34:27 +03:00
Denis.Zharkov
62bef48f9d
Adjust test data to changed rendering: T!! -> T & Any
...
^KT-26245 In Progress
2021-08-31 15:41:15 +03:00
Ivan Kochurkin
84c5f58cab
[FIR] Implement UNRESOLVED_REFERENCE_WRONG_RECEIVER
2021-08-25 21:53:23 +00:00
Andrey Zinovyev
1cd321a90f
[FIR] Add INAPPLICABLE_OPERATOR_MODIFIER diagnostic
2021-08-18 16:03:01 +03:00
Tianyu Geng
1679da45ab
FIR checker: COMMA_IN_WHEN_CONDITION_WITHOUT_ARGUMENT
...
FIR simply ignores anything after the first comma if the when expression
doesn't have a subject. Hence, the checker has to rely on PSI structure
instead.
2021-08-12 18:42:26 +03:00
Ivan Kochurkin
fd92b851a2
[FIR] Implement PACKAGE_OR_CLASSIFIER_REDECLARATION
...
Fix REDECLARATION positioning
2021-08-10 15:09:25 +00:00
Tianyu Geng
263b876e6e
FIR: extends scope of SENSELESS_COMPARISON
...
FE1.0 only reports SENSELESS_COMPARISON if one of the operand is `null`.
This change makes FIR reports also in case one of the operand has type
`Nothing?`.
In addition, fix handling of type alias in ConeTypeContext#isNullableType
2021-08-06 22:57:17 +03:00
Tianyu Geng
c7272f6986
FIR checker: SENSELESS_(COMPARISON|NULL_IN_WHEN)
...
Currently DFA does not set "definitely equal to null" for access to variables that got assigned `null`. For example, FIR should mark the following line as SENSELESS_COMPARISON due to `s = null` above.
https://github.com/JetBrains/kotlin/blob/d1531f9cdd5852352c0133198706125dc63b6007/compiler/testData/diagnostics/tests/smartCasts/alwaysNull.fir.kt#L6
The problem is at https://github.com/JetBrains/kotlin/blob/7e9f27436a77de1c76e3705da7aa1fbe8938336b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/FirDataFlowAnalyzer.kt#L1104
For null assignment, ideally the type should be `Nothing?`. This is
addressed in a followup commit instead.
2021-08-06 22:57:16 +03:00
Dmitriy Novozhilov
8578f0beea
[FE 1.0] Check for type mismatch for empty when statements
...
^KT-47922 Fixed
2021-08-04 19:33:45 +03:00
Andrey Zinovyev
015c2d1875
[FIR] Add NOTHING_TO_INLINE diagnostic
2021-08-04 17:33:08 +03:00
Dmitriy Novozhilov
b584fed93d
[FIR] Migrate warning/error pairs to DiagnosticFactoryForDeprecation
2021-08-03 00:20:11 +03:00