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
pyos
526e46cffc
FIR: fix some errors in local variable assignment analyzer
...
* wrong method was called from FirDataFlowAnalyzer.exitFunctionCall;
* map from function to affected properties should be keyed by symbol,
not FirFunction, as the latter may change;
* arguments of `return` and assignment statements should be visited,
as they may contain lambdas.
2022-06-10 09:43:48 +03:00
pyos
9968fa252a
FIR: fork flow on function entry, restore receivers on exit
...
^KT-52680 Fixed
2022-06-10 09:42:02 +03:00
Roman Golyshev
166c771e1b
[FIR IDE] Ensure resolve to CONTRACTS phase in ReturnTypeCalculator
...
If we want to analyse some function's call, we need to know about its
contracts, otherwise resolving the following code would be broken.
Computing return type of function is a prerequisite to using it in any
sensible way, so it's the best place to resolve it to CONTRACTS
KT-50733
2022-06-06 09:14:37 +00:00
Mikhail Glukhikh
16d5c28622
Unmute FIR spec tests muted for KT-38340
2022-04-19 15:56:00 +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
Ivan Kochurkin
31d9313c51
[FIR] Fix "Expected some types" exception, ^KT-51274 Fixed
2022-02-23 14:21:59 +03:00
Mikhail Glukhikh
2ac2fa5353
Flatten if chains also in LT FIR
2022-02-15 11:48:54 +03:00
Vladimir Dolzhenko
918a91dbdf
Escape special names with backticks in test data
...
#KT-51248
2022-02-10 21:20:47 +00: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
Ivan Kochurkin
84927e10b0
[FIR] Consider Nothing? as null constant in DFA, ^KT-44561 Fixed
2021-12-21 19:10:40 +03:00
Ivan Kochurkin
9e55e41d8b
[FIR] Propagate non-null info for val members, ^KT-44560 Fixed
2021-12-21 19:10:38 +03:00
Victor Petukhov
b3943f5ab6
[FE 1.0] Process builder inference stub types with different nullability properly
...
^KT-49887 Fixed
2021-12-15 22:23:18 +03:00
Dmitriy Novozhilov
1f0b62b25f
[FIR] Add smartcasts from == if equals is from Any
...
^KT-49127 Fixed
2021-12-03 14:19:25 +03:00
Denis.Zharkov
883b18a0c6
FIR: Preserve non-custom attributes after substitution
...
The test is being fixed since synthetic call for elvis has @Exact-attribute on return type
2021-11-26 19:39:45 +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
51b73bb6ae
[FIR] Add REDUNDANT_NULLABLE diagnostics
2021-11-24 23:13:40 +03:00
Ivan Kylchik
c7435ba760
Replace all occurrences of WITH_RUNTIME with WITH_STDLIB
...
We are going to deprecate `WITH_RUNTIME` directive. The main reason
behind this change is that `WITH_STDLIB` directive better describes
its meaning, specifically it will add kotlin stdlib to test's classpath.
2021-11-17 15:26:38 +03:00
Ivan Kochurkin
d0a4ca199d
[FIR] Add UNCHECKED_CAST
...
Regenerate diagnostics code
2021-11-12 15:20:45 +03:00
Ivan Kochurkin
2b5524b18f
[FIR] Add CAST_NEVER_SUCCEEDS
2021-11-12 15:20:44 +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
Mikhail Glukhikh
b0ec3cb831
Switch off FIR version off REDUNDANT_LABEL_WARNING (performance-related)
...
This reverts commit 363b2550 (partially)
2021-10-27 12:26:59 +03:00
Tianyu Geng
363b25504d
FIR checker: report REDUNDANT_LABEL_WARNING
...
Since many labels are not present in the FIR tree, this checker is
implemented as a syntax checker. Comparing with FE1.0, this change
reports some REDUNDANT_LABEL_WARNING that FE1.0 has missed, especially
LHS of assignments.
2021-10-25 13:51:01 +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
Denis.Zharkov
a0a57581ec
FIR: Do not add alias for variables with explicit type
2021-10-20 22:05:24 +03:00
Mark Punzalan
4f0b52b653
FIR: Transform annotations on type arguments during body resolve.
2021-10-12 18:56:32 +03:00
Ivan Kochurkin
7bedb6bca8
[FIR] Propagate not-null info into TypeOperatorCall ^KT-44559 Fixed
2021-10-06 21:56:05 +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
Mikhail Glukhikh
fc6403679a
Rename !USE_EXPERIMENTAL test directive to !OPT_IN
2021-09-10 16:29:16 +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
Dmitriy Novozhilov
5a5d25d350
[FE 1.0] Postpone ProhibitSimplificationOfNonTrivialConstBooleanExpressions till 1.7
...
^KT-39883
2021-09-02 13:34:25 +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
Denis.Zharkov
cdd8d1c163
Add AND (&) token
2021-08-31 15:41:09 +03:00
Mark Punzalan
580f1d51f6
FIR checker: report LOCAL_VARIABLE_WITH_TYPE_PARAMETERS
2021-08-26 12:25:07 +03:00
Ivan Kochurkin
84c5f58cab
[FIR] Implement UNRESOLVED_REFERENCE_WRONG_RECEIVER
2021-08-25 21:53:23 +00:00
Andrey Zinovyev
894a446585
[FIR] Add missing messages for jvm diagnostics and fix some tests
2021-08-19 15:25:51 +03:00
Andrey Zinovyev
1cd321a90f
[FIR] Add INAPPLICABLE_OPERATOR_MODIFIER diagnostic
2021-08-18 16:03:01 +03:00