Nikolay Lunyak
7056ad5325
[FIR] Set status.isOverride for fake overrides
...
Even though SO may not be correct
overrides sometimes, it feels more
natural to treat fake overrides as...
well, "overrides". And without it
we'd need to make the code in
`FirOverrideChecker` less intuitive.
2024-02-15 16:10:13 +00:00
Denis.Zharkov
14418a31ac
K2: Adjust test data after 9fa0f51a61
2023-02-15 09:17:11 +00:00
Dmitriy Novozhilov
aef9b129d2
[FIR] Add regression tests for number of issues fixed in K2
...
List of issues:
KT-4113, KT-6822, KT-7389, KT-17817, KT-20223
KT-21463, KT-24503, KT-24737, KT-24779, KT-24901
KT-27261, KT-28668, KT-30497, KT-30756, KT-36958
KT-37365, KT-37490, KT-38288, KT-41038, KT-41721
KT-42136, KT-42169, KT-42449, KT-42715, KT-43553
KT-43603, KT-43846, KT-43936, KT-46288, KT-46301
KT-47373, KT-47484, KT-47490, KT-47495, KT-47750
KT-47815, KT-47870, KT-48975, KT-49024, KT-49045
KT-50134, KT-50160, KT-50550, KT-51045, KT-51143
KT-51796, KT-52262, KT-52424, KT-52860, KT-52934
KT-53086, KT-53494, KT-53671, KT-53752, KT-53819
KT-54478, KT-54518, KT-54931, KT-54990, KT-55138
KT-55379, KT-55555, KT-56243
2023-02-14 17:08:55 +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
Ilya Kirillov
644d1bf0d0
[FIR] ignore tests which fail because of resolve contracts violation
2022-12-12 16:21:07 +00:00
pyos
9f4cfa2c50
FIR CFG: ignore exception edges when looking for return values
...
^KT-54668 Fixed
2022-12-08 10:19:34 +00:00
Dmitriy Novozhilov
06e88b559a
[FIR] Consider ConeConstraintSystemHasContradiction as a good reason for DELEGATE_SPECIAL_FUNCTION_NONE_APPLICABLE error
2022-11-22 15:46:21 +00:00
Dmitriy Novozhilov
bc9bc26cc8
[Test] Add test for KT-54668
2022-10-27 11:08:56 +00:00
Dmitriy Novozhilov
a6c7d4c0c6
[FIR] Analyze bodies of non delegated property accessors without expected type
...
^KT-53349 Fixed
2022-10-03 15:48:17 +03:00
Mikhail Glukhikh
38f4a35be2
FIR: introduce flexible types pretty rendering for no arguments case
...
#KT-52020 Fixed
2022-06-29 16:50:05 +00:00
Tianyu Geng
765cad8448
FIR checker: substitute type parameters in dispatch receiver type
...
Consider the following code:
```
fun test(a: List<String>) {
a.first()
}
```
The dispatch receiver type of `first` in this case is `List<T>` before
this change. After this change, it's `List<String>`.
In addition, this change also replace the dispatch receiver type with
the more specific type if available. For example, consider the following
```
class MyList: ArrayList<String>()
fun test(a: MyList) {
a.get(0)
}
```
The dispatch receiver type of `get` is `MyList`, instead of
`ArrayList<String>`. That is, a fake override is created in this case.
2021-09-17 01:59:06 +03:00
Ivan Kochurkin
2574dc907c
[FIR] Implement FUNCTION_EXPECTED
2021-07-28 23:17:31 +03:00
Andrey Zinovyev
a6984c5198
[FIR] Add NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY diagnostic
2021-07-19 13:40:28 +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
Mikhail Glukhikh
0f9f63400e
FirSupertypesChecker: implement six more diagnostics
2021-05-13 16:13:43 +03:00
Jinseong Jeon
9b39a8abc2
FIR: avoid wrapping an erroneous type as FirResolvedTypeRef
...
Instead, use FirErrorTypeRef, a subtype of FirResolvedTypeRef
2021-04-29 22:31:38 +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
Mikhail Glukhikh
9f27362ee1
Match triangle & diamond intersections in FirTypeIntersectionScope
2021-04-02 10:24:20 +03:00
Mikhail Glukhikh
9ce8420491
FIR: introduce not implemented checker
2021-03-24 16:07:25 +03:00
Dmitriy Novozhilov
dceb8b2991
[FIR] Don't render ! at the end of ConeFlexibleType
2021-03-11 13:10:05 +03:00
Dmitriy Novozhilov
65ea4e184a
[FIR] Fix enhancement of FlexibleNullability and EnhancedNullability
...
- Add utilities to add new attribute to ConeAttributes
- Get rid of FlexibleNullability attribute (it can be easily inferred
for any flexible type at any moment)
- Fix determining of EnhancedNullability attribute
2021-03-11 13:10:04 +03:00
Jinseong Jeon
e009b71f88
FIR checker: report uninitialized member/extension properties
2021-03-04 17:56:29 +03:00
Mikhail Glukhikh
34c90aab3b
FIR: introduce & use REFERENCE_BY_QUALIFIER positioning strategy
2021-02-19 18:24:46 +03:00
Dmitriy Novozhilov
e1802fde29
[TD] Update test data after previous commit
2020-12-16 19:52:30 +03:00
Dmitriy Novozhilov
e6b5cb5216
[TD] Update diagnostics test data due to new test runners
...
Update includes:
- Changing syntax of `OI/`NI` tags from `<!NI;TAG!>` to `<!TAG{NI}!>`
- Fix some incorrect directives
- Change order of diagnostics in some places
- Remove ignored diagnostics from FIR test data (previously `DIAGNOSTICS` didn't work)
- Update FIR dumps in some places and add `FIR_IDENTICAL` if needed
- Replace all JAVAC_SKIP with SKIP_JAVAC directive
2020-12-16 19:52:25 +03:00
Jinseong Jeon
fc7f589caa
FIR Java: record Java types with flexible nullability
2020-11-18 13:06:46 +03:00
Denis Zharkov
28c536e511
FIR: Add temporary workaround to avoid changes in test data
...
CallableId for intersection overrides has been changed in previous commits
and many rendered FIR test data needs to be changed
But, we're going to get rid of callableId's/or fix them back for intersection overrides soon
2020-10-01 17:49:02 +03:00
Dmitriy Novozhilov
fb871a55a3
[FIR] Don't create backing field for property without explicit type
...
#KT-41977 Fixed
2020-09-29 10:17:42 +03:00
Dmitriy Novozhilov
0e91c8f048
[FIR] Create synthetic properties for members of java annotations
...
#KT-41939 Fixed
2020-09-23 14:05:10 +03:00
Nick
6f85a07290
[FIR] Don't report duplicated errors in property declarations
2020-08-02 18:19:46 +03:00
Mikhail Glukhikh
93632d2a18
FIR declaration transformer: unwrap synthetic property accessor properly
2020-07-15 13:36:29 +03:00
Mikhail Glukhikh
e2678149cb
FirClassSubstitutionScope: fix overridden symbols traversing
2020-07-15 13:36:29 +03:00
Denis Zharkov
bea37569e6
FIR: Fix processOverriddenFunctions implementations
2020-06-11 11:31:36 +03:00
Denis Zharkov
38922a84f1
FIR: Do not create synthetic properties for non-Java accessors
...
^KT-35495 Fixed
2020-06-11 11:01:43 +03:00
Dmitriy Novozhilov
cc07ae96b3
[FIR-TEST] Move analysis tests to separate module
2020-03-19 09:51:01 +03:00