Denis.Zharkov
964cf937c3
Fix IllegalStateException in case of recursive T & Any upper bound
...
^KT-50542 Fixed
2022-01-13 12:54:47 +03:00
Dmitriy Novozhilov
b2b5f4a63a
[FE 1.0] Don't report deprecation diagnostics about enum on it's own entries
...
^KT-37975 Fixed
2022-01-12 19:11:28 +03:00
Roman Golyshev
54cca88279
KT-50728 Enforce receiver type resolve
...
When stdlib is represented as a source dependency (which seems to be the
case in the `kotlin` project), it will be resolved lazily for the IDE.
Same thing can happen if someone decides to "extend" the stdlib
by declaring their declaration in the `kotlin` package
In both of those cases, we need to make sure that receiver type is fully
resolved before trying to get a `coneType` from it
N.B. To make resolve tests work, I've added a separate folder
`withAllowedKotlinPackage` to the `testData`, because in the default
test setup it is not allowed to extend the `kotlin` package by user's
definitions
^KT-50728 Fixed
2022-01-11 22:23:57 +00:00
Jinseong Jeon
7ff468d9e3
FIR LC: populate only const property on multi-file facade
2022-01-11 21:30:54 +03:00
Denis.Zharkov
a33d9df0cd
NI: Support forking inference with heuristics
...
Mostly, it only affects FIR
It partially allows to consider several variance of constraints like
A<Int> & A<T> <: A<X_var> that are mostly brought by smart casts
^KT-49542 Fixed
^KT-50489 Relates
2022-01-11 20:45:55 +03:00
Victor Petukhov
455b3143e7
[FE 1.0] Introduce builder inference stub types checker which may report more precise and clear errors due to resolution ambiguity
...
^KT-49828 Fixed
2022-01-11 18:34:47 +03:00
Victor Petukhov
8e2b90b5db
[FE 1.0] Don't report CAST_NEVER_SUCCEEDS on stub types
...
^KT-49829 Fixed
2022-01-11 18:34:41 +03:00
Victor Petukhov
37d163d417
[FE 1.0] Don't lose diagnostics during lambda analysis at the overload resolution by return type stage
...
^KT-49658 Fixed
2022-01-11 18:07:05 +03:00
Roman Golyshev
5964d8c566
KTIJ-20618 FIR IDE: Enforce resolved type bounds in ConeTypeContext.kt
...
When lazy resolve is involved, type bounds can be in an unresolved
state (e.g. `FirUserTypeRef` instead of `FirResolvedTypeRef`). To
enforce the resolve, we use `resolvedTypeBounds` where it might be
important
^KTIJ-20618 Fixed
2022-01-11 13:56:17 +00:00
Denis.Zharkov
9be4f818f4
FIR: Weaken some UPPER_BOUND_VIOLATED restrictions
...
See test data at starProjectionInsteadOutCaptured.kt
^KT-49412 Fixed
^KT-50230 Relates
^KT-48044 Fixed
2022-01-11 16:27:06 +03:00
Mads Ager
ea86d52faf
[Analysis API] Avoid exception from getImportAlias.
2022-01-10 19:50:15 +03:00
Jinseong Jeon
62fb8446dc
FIR LC: remove unnecessary type parameter shift for inner class
...
U/LC don't do anything like that, and it rather skips necessary type
paraemters to render.
2022-01-10 12:00:10 +03:00
Ilya Kirillov
5e42be9849
Analysis API: fix redundant caret symbol in testdata
2022-01-02 21:56:54 +03:00
Ilya Kirillov
11c50a48ba
Analysis API: add isSubclassOf tests
2022-01-02 21:56:53 +03:00
Ilya Kirillov
e6fc434489
Analysis LC: fix isSubClass check for local LC
2022-01-02 21:56:53 +03:00
Ilya Kirillov
b81316738e
Analysis FIR: fix isSubClass check for local classes
2022-01-02 21:56:52 +03:00
Ilya Kirillov
1d6d67d0a1
FIR IDE: regenerate tests
2022-01-02 21:56:51 +03:00
Ilya Kirillov
b916c5116a
Analysis LC: add missing text range for LC
2022-01-02 21:56:50 +03:00
Ilya Kirillov
af789346f5
Analysis API: fix getKtExpressionType for array assignment target
2022-01-02 21:56:49 +03:00
Ilya Kirillov
27ab406445
Analysis: restore fix of ^KTIJ-16968 after move to PSI builder to kotlin repository
2021-12-30 13:44:30 +03:00
Jinseong Jeon
a153a1fefb
FIR LC: create inline methods
...
unless the functions (or accessors) have reified type parameters
or inline-only annotations
2021-12-30 10:47:32 +03:00
Ivan Kylchik
6fc56477bf
Drop all tests that disable features for language version less than 3
2021-12-28 20:08:56 +03:00
Ilya Kirillov
4d7af4beae
Analysis: fix imports and module names
2021-12-27 16:23:46 +03:00
Ilya Kirillov
4c94e2958e
Analysis: add more run configurations
2021-12-27 16:23:22 +03:00
Ilya Kirillov
2c80a53a73
Analysis: generate symbol LC tests
2021-12-27 16:23:18 +03:00
Ilya Kirillov
40fdb26569
Analysis LC: introduce Symbol LC tests
2021-12-27 16:23:18 +03:00
Ilya Kirillov
abf7a4c5ac
Introduce ConcurrentMapBasedCache
2021-12-27 16:23:17 +03:00
Ilya Kirillov
1bba3b2256
Migrate decompiled light classes factories from IJ
2021-12-27 16:23:17 +03:00
Jinseong Jeon
09f5ec7bd3
FIR LC: add supports for decompiled declarations
2021-12-27 16:23:16 +03:00
Ilya Kirillov
aa87524513
Migrate stub and psi builders by classfiles form IJ repository
2021-12-27 16:23:16 +03:00
Ilya Kirillov
0efc819e48
Fix invalid repeatable annotations loading in sutb builder
2021-12-27 16:23:16 +03:00
Ilya Kirillov
d2832697d9
Move stub building test generation to analysis generator
2021-12-27 16:23:15 +03:00
Ilya Kirillov
1e9764c639
Move stub building from psi module to analysis module
2021-12-27 16:23:14 +03:00
Ilya Kirillov
b563824b35
Migrate LightMemberOriginForCompiledElement from IJ repository
2021-12-27 16:23:13 +03:00
Ilya Kirillov
764ad8b9fa
Move light classes for decompiled declarations from IJ repository
2021-12-27 16:23:12 +03:00
Ilya Kirillov
fceb46924e
Move decompiler from IJ repository
...
This commit just moves files and fixes imports
2021-12-27 16:23:11 +03:00
Roman Golyshev
3f8fff55cf
FIR IDE: Fix ImportOptimizer for types used as generics' parameters
2021-12-24 16:31:34 +00:00
Roman Golyshev
287c23269a
FIR IDE: Make getContainingPsi work with ItLambdaParameter source
...
It prevented the code completion to work in positions like
`"hello".let { <caret> }`
2021-12-24 16:19:30 +03:00
Mikhail Glukhikh
61e0375900
Drop YIELD_IS_RESERVED diagnostic in 1.7.0 #KT-27750 Fixed
2021-12-23 17:45:50 +03:00
Mikhail Glukhikh
3f02309dad
FIR: add example 2 from KT-49925 (fails yet)
2021-12-23 17:27:59 +03:00
Mikhail Glukhikh
dde4c46df7
FIR: add original test from KT-49925 (passes)
2021-12-23 17:27:56 +03:00
Mikhail Glukhikh
e872cfa69a
FIR: add test repeating problem from KT-50470
2021-12-22 22:21:39 +03:00
Ivan Kochurkin
ee7e04b28e
[FIR] Ignore smartcast for non-final members from Java, ^KT-50219 Fixed
2021-12-21 19:10:40 +03:00
Ivan Kochurkin
c5a03d0573
[FIR] Remove dependent data flow variables after receiver reassignment
2021-12-21 19:10:37 +03:00
Roman Golyshev
e3219cc5b6
FIR IDE: Avoid resolving elvis operator, because it doesn't make sense
...
There are intrinsics to which elvis operator's usages are resolved;
however, we do not want to expose those intrinsics through the
high-level resolve
2021-12-21 18:48:00 +03:00
Dmitriy Novozhilov
8a58e98530
[FE 1.0] Support proper DUPLICATE_LABEL_IN_WHEN reporting for deprecated complex boolean expressions
...
^KT-50385
^KT-39883
2021-12-21 16:36:20 +03:00
Dmitriy Novozhilov
eb753eac83
[FE 1.0] Report DUPLICATE_LABEL_IN_WHEN on proper branches
...
^KT-50385 Fixed
2021-12-21 16:36:19 +03:00
Mikhail Glukhikh
1938438fa1
FIR: save/restore tower data contexts during resolve jumps
...
#KT-50278 Fixed
2021-12-21 10:45:36 +00:00
Mikhail Glukhikh
25f30cb3a9
FIR: add resolve test for potential local scope problems
2021-12-21 10:45:34 +00:00
Mads Ager
61265a6501
Return error candidates from KtFirArrayAccessReference.resolveToSymbols
2021-12-21 13:22:15 +03:00