Commit Graph

256 Commits

Author SHA1 Message Date
Tianyu Geng f217bb94de Use more consistent names for inheritors of BooleanIsMissing 2021-11-04 23:04:35 +01:00
Tianyu Geng 2c2851af6e Analysis API: add test covering get missing when branches
Also fix FIR implementation to generate boolean branches in the same
order as FE1.0.
2021-11-04 23:04:35 +01:00
Tianyu Geng ae50d52131 FIR IDE: add validity token to data classes related to smartcast API
Also move KtImplicitReceiverSmartCast closer to where it's used.
2021-11-04 16:00:38 +01:00
Tianyu Geng 7de0937031 FIR IDE: get unstable smartcast from FE1.0-based analysis API
Note that the current FE1.0 implementation still has some limitations

1. only references used as receiver are being considered for smartcast.
2. Somehow the smartcast information is not retained if the for generic
typed receivers. See multiSmartcastAsReceiver_stable.descriptors.txt
2021-11-04 16:00:37 +01:00
Tianyu Geng 197079c85c FIR IDE: make smartcast API return unstable smartcasts 2021-11-04 16:00:37 +01:00
Ilya Kirillov 6462642988 Analysis API: fix type rendering for ConeDefinitelyNotNullType 2021-11-04 12:05:05 +01:00
Ilya Kirillov da88ddfc71 FIR IDE: always approximate non-denotable types for creating PsiType 2021-11-04 12:05:04 +01:00
Ilya Kirillov bec9cec31c LL API: correctly resolve FirSyntheticPropertyAccessor 2021-11-04 12:05:04 +01:00
Ilya Kirillov 79f30755a5 FIR LC: do not create light classes for non-source declarations 2021-11-04 12:05:03 +01:00
Ilya Kirillov 55e6df6920 Analysis API: do not consider ValidityToken when comparing symbols and types
Symbols with the same FirDeclaration may come from the different analysis sessions
2021-11-04 12:05:02 +01:00
Ilya Kirillov d63c136854 Analysis API: recreate analysis session when not found by resolve state 2021-11-04 12:04:54 +01:00
Denis.Zharkov 2e37ec6f0c FIR: Fix false-positive ILLEGAL_RESTRICTED_SUSPENDING_FUNCTION_CALL on invokeExtension calls 2021-11-02 19:08:27 +03:00
Denis.Zharkov 37b5237e97 FIR: Fix type alias case for callable reference resolution type 2021-11-02 19:08:26 +03:00
Jinseong Jeon c3c79b874d FIR IDE: make constant evaluator robust to arithmetic exception 2021-11-01 22:50:47 +01:00
Jinseong Jeon 5aa8e2d0d1 FIR LC: fix nullable annotation on return type of suspend function 2021-11-01 19:19:39 +01:00
Jinseong Jeon 5880d80d26 FIR LC: add support for inline class 2021-11-01 19:17:26 +01:00
Jinseong Jeon 0e7d1b3945 FIR LC: refactor creation of property accessors 2021-11-01 19:17:26 +01:00
Victor Petukhov c8dea3db35 Add test for using underscored type in different positions 2021-11-01 13:03:40 +03:00
Victor Petukhov 5508d40371 Put using underscored type arguments under a feature 2021-11-01 12:25:45 +03:00
Victor Petukhov 248c9550cd Support type annotations resolution on an underscored type argument 2021-11-01 12:25:10 +03:00
Victor Petukhov b69fb6779f Basic support of partially specified type arguments though a new underscore operator for type arguments
^KT-13394
2021-11-01 12:25:07 +03:00
zhelenskiy ea10b4a781 Synchronizing by values and primitives is forbidden
Signed-off-by: zhelenskiy <zhelenskiy2000@yandex.ru>
2021-10-29 18:50:30 +02:00
Dmitriy Novozhilov 877b53201b [FIR] Prohibit access to members of companion of enum from enum entry initializer
^KT-49110
2021-10-29 18:45:23 +03:00
Roman Golyshev 29bb8cea8f [FIR] Add missing ensureResolved to FirClassSubstitutionScope
`createNewTypeParametersAndSubstitutor` call might need resolved types
to be able to work correctly with the generics' type bounds
2021-10-29 15:59:35 +03:00
Ivan Kochurkin 744191099c [FIR] Fix false positive "return required" for if/else with inlined return in branch
^KT-49289 Fixed
2021-10-28 20:02:25 +03:00
Tianyu Geng b48870c11f FIR checker: pass expected array type in ASSIGNING_SINGLE_ELEMENT_TO_VARARG_IN_NAMED_FORM_FUNCTION
This is needed by the IDE quickfix to generate the correct `arrayOf` (or
`intArrayOf`, etc`) wrapper call.
2021-10-28 16:36:02 +03:00
Dmitriy Novozhilov 0cce0fbbfb [FIR] Remove unused methods from FirProvider
Those methods were created for first prototype of FIR plugin API, and
  now they are completely redundant
2021-10-28 15:01:22 +03:00
Dmitriy Novozhilov 4490f64666 [FIR] Get rid of FirAnnotatedDeclaration
Now all fir declarations have annotations

^KT-49260 Fixed
2021-10-28 15:01:18 +03:00
Nikolay Lunyak 0eb2d117ef [FIR] KT-45972, KT-49072: Add visibility checks to the type resolution 2021-10-28 14:31:27 +03:00
Jinseong Jeon 2dc2a90755 Introduce an API to convert TypeConstructorMarker to TypeParameterMarker 2021-10-28 12:54:45 +03:00
Ilya Chernikov da2d3f29da Add multiple renderer sources support to new diagnostics infrastructure 2021-10-27 22:17:41 +02:00
Ilya Chernikov 9e60c70db7 Add abstract source element and switch diagnostics to it 2021-10-27 22:17:40 +02:00
Ilya Chernikov d3f3aa4b29 Move specific diagnostics infrastructure to frontend.common-psi 2021-10-27 22:17:40 +02:00
Ilya Chernikov e9f59e8d1d Move common diagnostics infrastructure to frontend.common 2021-10-27 22:17:39 +02:00
Ilya Chernikov f1d0ead652 Fix fir analysis api after refactorings 2021-10-27 22:17:39 +02:00
Ilya Chernikov 31c58767cf Rearrange fir diagnostic for further reuse 2021-10-27 22:17:39 +02:00
Ilya Chernikov a65beb2dc5 Move Fir*SourceElement to frontend.common, rename to Kt* (complete) 2021-10-27 21:44:11 +02:00
Mikhail Glukhikh 8bd0b237b7 Convert EXPOSED_PROPERTY_TYPE_IN_CONSTRUCTOR into deprecation error
#KT-28078 Fixed
2021-10-27 19:43:01 +03:00
Tianyu Geng a969e5af50 FIR: fix API mode checker for local functions 2021-10-27 19:42:52 +03:00
Tianyu Geng 31b7248769 FIR: suppress excessive warning on java Class
The root cause is https://youtrack.jetbrains.com/issue/KT-49358 though.
We should undo this change after that issue is fixed.
2021-10-27 19:42:45 +03:00
Jinseong Jeon 3f2c86afb8 FIR IDE/LC: introduce/use delegated member scope 2021-10-27 17:06:32 +02:00
Jinseong Jeon 700f8ac287 FIR IDE: relocate scope-related test data 2021-10-27 17:06:32 +02:00
Jinseong Jeon 4266ffa274 FIR IDE: fix typo in test directory (overridden) 2021-10-27 17:06:32 +02:00
Jinseong Jeon 907d2e9ed4 FIR LC: populate delegates to interface methods 2021-10-27 17:06:31 +02:00
Jinseong Jeon 693564084a FIR LC: populate delegate fields 2021-10-27 17:06:31 +02:00
Jinseong Jeon b52912162f FIR IDE: API to indicate delegated property 2021-10-27 17:06:30 +02:00
Jinseong Jeon 96fbbb6f69 FIR LC: reorder fields (to be backward-compatible) 2021-10-27 17:06:30 +02: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
Victor Petukhov 2261928f4f Process simple CapturedType in ClassicTypeSystemContext.typeConstructorProjection as well
^KT-49101 Fixed
2021-10-26 19:37:58 +03:00
Victor Petukhov 02d06b6390 Transform VisibilityError diagnostic for callable references to further report it on the corresponding argument of a base call
^KT-46437 Fixed
2021-10-26 19:37:57 +03:00