Ivan Kochurkin
fd92b851a2
[FIR] Implement PACKAGE_OR_CLASSIFIER_REDECLARATION
...
Fix REDECLARATION positioning
2021-08-10 15:09:25 +00:00
Andrey Zinovyev
1b81018b69
[FIR] Fix overloading of renamed jvm methods
...
#KT-48102 Fixed
2021-08-09 15:22:06 +03:00
Tianyu Geng
cd99c35649
FIR: instantiate type argument to captured type if needed
2021-08-09 14:38:30 +03:00
Dmitriy Novozhilov
1d491fdce6
[FIR] Don't create union call node for lambda from one when branch and call from condition of another
2021-08-06 22:57:18 +03:00
Tianyu Geng
684ef871ee
FIR: unify common special names scattered around the code base
2021-08-06 22:57:17 +03: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
4726dcce40
FIR DFA: smartcast variable to Nothing? on null assignment
...
In order to make resolution still work for members not available from
`Nothing`, we track the type without `Nothing?` and use that for
resolution instead.
2021-08-06 22:57:15 +03:00
Tianyu Geng
7e2f15f532
FIR DFA: fix logic clear aliasing
...
The logic should clear back aliases as well. To ensure all back aliases
don't lose any information, statements on the original variable are
copied over to its aliases.
2021-08-06 22:57:15 +03:00
Tianyu Geng
e495c722c7
FIR DFA: fix handling of equality operation
2021-08-06 22:57:14 +03:00
Tianyu Geng
0026560bd7
FIR: substitute the whole lambda body after builder inference
2021-08-06 22:57:13 +03:00
Tianyu Geng
f737d8002e
FIR: allow no else branch for when on Nothing(?)
2021-08-06 22:57:12 +03:00
Andrey Zinovyev
6dd4164f1e
[FIR][CFG] Link finally exit to jump target
...
Instead of try exit node. So try exit is used only for real exits from
try expressions.
2021-08-06 11:49:35 +03:00
Andrey Zinovyev
32426da625
[FIR][CFG] Support multiple levels of finally blocks in jumps
...
Jump inside try expressions now goes through all finally blocks between
it and the target
2021-08-06 11:49:35 +03:00
Andrey Zinovyev
06b23d5937
[FIR] Improve the control flow graph around try expressions
...
1. throw goes to catches instead of main exist block
2. return goes via finally (single level only supported atm)
3. collect non-direct return to retrieve all return expressions easier
2021-08-06 11:49:34 +03:00
Mikhail Glukhikh
8d27f102e7
Fix typo: addCompetedCall -> addCompletedCall
2021-08-05 19:24:06 +03:00
Mikhail Glukhikh
22ccb7a943
FIR: discriminate generics during callable reference resolve
2021-08-05 19:24:04 +03:00
Dmitriy Novozhilov
60195114c1
[FIR] Properly create class scopes while resolving of annotations arguments
2021-08-04 18:23:06 +03:00
Andrey Zinovyev
6ab632f6ad
[FIR] Fix mutable context usage in inline diagnostics
...
Also some minor fixes
2021-08-04 17:33:15 +03:00
Andrey Zinovyev
28344c8530
[FIR] Add NOT_YET_SUPPORTED_IN_INLINE diagnostic
2021-08-04 17:33:07 +03:00
Denis.Zharkov
edf9f5e647
FIR: Minor. Clarify name for containingClassForStaticMemberAttr
2021-08-03 16:24:46 +03:00
Igor Yakovlev
bbd21da835
[FIR] Move ARGUMENTS_OF_ANNOTATIONS on top of STATUS phase
2021-08-02 20:29:09 +03:00
Igor Yakovlev
0f3f56f676
[FIR] Update resolve status of annotations to partially resolved
2021-08-02 20:29:08 +03:00
Igor Yakovlev
8fd2ddad12
[FIR] Downgrade ensure resolves to types instead of status
2021-08-02 20:29:07 +03:00
Igor Yakovlev
c0949fbc18
[FIR] Remove redundant ensure to status in FirPackageMemberScope
2021-08-02 20:29:06 +03:00
Igor Yakovlev
9fdd3dc53f
[FIR IDE] Add support of lazy phase for annotation arguments
2021-08-02 20:29:06 +03:00
Dmitriy Novozhilov
71def0666e
[FIR] Introduce special phase for resolve of enums and class literals
2021-08-02 20:29:05 +03:00
Ivan Kochurkin
afb85026c4
Revert "[FIR] Implement INVISIBLE_SETTER"
...
This reverts commit b3d7ed56
2021-08-02 20:10:22 +03:00
Simon Ogorodnik
ed07e1c778
[FIR] Add missing type-alias unwrap in CompletionModeCalculator
2021-08-02 17:07:15 +03:00
Simon Ogorodnik
8e890eba3e
[FIR] Hack-in indirectly nested locals resolution
2021-08-02 17:07:15 +03:00
Mark Punzalan
504449f03e
FIR: Report UNSAFE_CALL instead of SMARTCAST_IMPOSSIBLE when smartcast
...
to null.
Currently the error message shows the expression is impossible to
smartcast to the nullable type, which is nonsensical since it's already
that type.
2021-07-30 21:49:50 +03:00
Ivan Kochurkin
1a40164ef0
[FIR] Fix resolving of single underscore _
...
Now compiler throws `UNRESOLVED_REFERENCE` here:
```
val boo = { _: Exception -> `_`.stackTrace }
```
2021-07-30 16:58:07 +00:00
Ivan Kochurkin
2fbb700ec6
[FIR] Add nonFatalDiagnostics to FirQualifierAccess
2021-07-30 16:58:05 +00:00
Ivan Kochurkin
b307358f69
[FIR] buildErrorExpression for labels with underscored name
...
Add ConeDiagnosticWithSource, ConeUnderscoreIsReserved, ConeUnderscoreUsageWithoutBackticks diagnostics
2021-07-30 16:58:05 +00: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
Ivan Kochurkin
2574dc907c
[FIR] Implement FUNCTION_EXPECTED
2021-07-28 23:17:31 +03:00
Andrey Zinovyev
b706e776ad
[FIR] Add VARIABLE_WITH_NO_TYPE_NO_INITIALIZER diagnostic
2021-07-28 16:56:53 +03:00
Igor Yakovlev
02f2f6c148
[FIR IDE] Code review minor changes
2021-07-26 23:08:54 +02:00
Igor Yakovlev
66fa624ab7
[FIR IDE] Fix IDE return type calculators
2021-07-26 23:08:54 +02:00
Igor Yakovlev
ab2aaec4fe
[FIR IDE] Ensure resolve for status transformer
2021-07-26 23:08:53 +02:00
Igor Yakovlev
6869fbbfe5
[FIR IDE] Insert ensure resolve into checkers and scopes
2021-07-26 23:08:53 +02:00
Igor Yakovlev
2fd6c55fc8
[FIR IDE] Replace FIR phase update to FIR IDE
2021-07-26 23:08:53 +02:00
Andrey Zinovyev
8a0941a85a
[FIR] Report deprecations in qualified expressions
2021-07-26 14:50:54 +03:00
Jinseong Jeon
5358d4f07c
FIR IDE: construct function type from a function as PsiType
2021-07-23 13:28:05 +02:00
Dmitriy Novozhilov
9b00776dba
[FIR] Create CFG node for ::class calls
2021-07-23 12:20:39 +03:00
Tianyu Geng
c648356887
FIR: report ENUM_ENTRY_AS_TYPE and IS_ENUM_TYPE
...
These two diagnostics are similar: both are reported on type references
to enum entries. But `IS_ENUM_TYPE` is reported if the type ref is an
operand of `is` operator. To pass along this contextual information, a
boolean is added to FirSpecificTypeResolverTransformer.
2021-07-22 20:39:56 +03:00
Andrey Zinovyev
6ef4523555
[FIR] Cache callable names in some composite scopes
2021-07-20 14:25:16 +03:00
Dmitriy Novozhilov
f3116cb64a
Fix NON_EXHAUSTIVE_WHEN_STATEMENT warnings in project code
2021-07-20 13:33:46 +03:00
Dmitriy Novozhilov
749dbf4d44
[FIR] Safe dependency symbol provider in IDE session
2021-07-20 10:33:53 +03:00
Dmitriy Novozhilov
37c096cb10
[FIR] Support creation of IR of common + platform sources in FirAnalyzerFacade
2021-07-20 10:33:52 +03:00