Commit Graph

45 Commits

Author SHA1 Message Date
Tianyu Geng 5fbe5981f7 Analysis API: add KtType.isDenotable() 2021-12-15 16:09:31 +03:00
Tianyu Geng 2f393cdd02 FE1.0 Analysis API: get smartcast if available with getKtExpressionType
The current implementation still does not work with multicast. In
addition, it appears FE1.0 does not attempt smart cast if it's not used.
2021-12-15 16:09:29 +03:00
Mikhail Glukhikh e558575aec Fix FIR bootstrap: add explicit type arguments (see KT-49925) 2021-12-10 08:22:16 +03:00
Tianyu Geng f197fc93db Analysis API: add test for KtDiagnosticsProvider 2021-12-09 15:56:52 +03:00
Tianyu Geng f1bd3597f8 FE1.0 Analysis API: make KtSymbol only reference declaration-site subst-overrides
This is the FE1.0 counterpart of fa8bb47bdf
2021-12-09 11:01:52 +01:00
Tianyu Geng 9b05019137 FIR Analysis API: reimplement KtFirCallResolver with new data model 2021-12-06 12:40:43 +01:00
Tianyu Geng c9f9ce99c1 Analysis API: adapt to KtCall data model change
Also add API to check if a `KtFunctionSymbol` is the invoke function on
a Kotlin builtin functional type.
2021-12-06 12:40:42 +01:00
Ilya Kirillov 6e4c87f138 Analysis API: pretty print declarations additionaly to debug rendering in some tests 2021-12-02 20:09:19 +01:00
Ilya Kirillov bad91915a6 Analysis API: adapt reference resolve tests to changes in renderer 2021-12-02 20:09:19 +01:00
Ilya Kirillov 985c6fa0b8 Analysis API: rework KtSymbol hierarchy
- make some symbols to be KtPossiblyMemberSymbols
- introduce KtDeclarationSymbol for declarations
2021-12-02 20:09:19 +01:00
Ilya Kirillov 19dec92247 Analysis API: rework declaration renderer
- refactor code to use PrettyPrinter instead of ad-hoc one
- do not print nested local declarations as this does not seem to have use-cases
2021-12-02 20:09:18 +01:00
Ilya Kirillov 7919dae558 Analysis API: improve rendering of constant values 2021-12-02 20:09:17 +01:00
Ilya Kirillov f722a54c78 Analysis API: separate constant values from annotation values 2021-12-02 20:09:16 +01:00
Ilya Kirillov 47c1da2845 FIR IDE: separate KtAnnotationApplication and KtAnnotationApplicationValue 2021-12-02 20:09:16 +01:00
Ilya Kirillov b1c8a9e886 Analysis API: rename KtConstantValue -> KtAnnotationValue as it is annotation specific 2021-12-02 20:09:14 +01:00
Tianyu Geng 6e555e1d28 FE1.0 Analysis API: fix getReturnTypeForKtDeclaration for setter parameter 2021-11-30 18:02:33 +01:00
Tianyu Geng f1d0791f15 Analysis API: add test for KtDeclaration.getReturnKtType
FE1.0 always return kotlin.Unit as return type for constructors while
FIR returns the constructed class type. I am not sure which is more
desirable. Also, I am not sure how to make FE1.0 behave the same way.
2021-11-30 18:02:33 +01:00
Roman Golyshev fa8bb47bdf [FIR IDE] Add unwrapping substitution overrides which doesn't affect function's signature
Also, do not use PSI to restore SUBSTITUTION_OVERRIDE function/property
symbols
2021-11-25 21:19:56 +03:00
Ilya Kirillov 1d1f5ace8f Analysis API: rename KtCallableSymbol.type -> returnType 2021-11-22 22:47:01 +01:00
Ilya Kirillov d0318f1026 Analysis API: add test for file annotations 2021-11-22 22:47:00 +01:00
Ilya Kirillov 02adb1924b Analysis API: add tests to check annotations on declarations 2021-11-22 22:46:58 +01:00
Ilya Kirillov 22cbcfb3c4 Analysis API: do not require tests to call super.doTestByFileStructure 2021-11-22 22:46:57 +01:00
Ilya Kirillov a084ad59de Analysis API: add test for annotations on types 2021-11-22 22:46:56 +01:00
Ilya Kirillov a5a5ff39d6 Analysis API: get rid of KtTypeAndAnnotations & add annotations for every type 2021-11-22 22:46:53 +01:00
Tianyu Geng d0d1c8c4b9 Analysis API: add test for getReturnExpressionTargetSymbol
Also fix FIR and FE1.0 implementations.
2021-11-19 23:29:17 +01:00
Jinseong Jeon 205866a516 FIR IDE: add API to get KtType from KtTypeParameter 2021-11-18 17:33:17 +01:00
Ilya Kirillov 7cb1f19a79 Analysis API: move component test classes to corresponding dirs 2021-11-17 20:55:10 +01:00
Roman Golyshev 4e1e1570df [FIR IDE] Add getDispatchReceiverType function and use
This function is under a heavy deprecation and should not be used,
since it will most probably be removed in the future
2021-11-15 14:36:31 +03:00
Tianyu Geng 1a22124c02 FIR IDE: add helper to resolve call for any KtElement 2021-11-12 21:56:45 +01:00
Yan Zhulanow d6b9b8bdd4 [FIR IDE] Compare error types consistently in test data
Use the fixed error type description so test data can be shared
across both frontends.
2021-11-12 20:09:51 +09:00
Yan Zhulanow bba53aa967 [FIR IDE] Prettify DebugSymbolRenderer, unify its behavior 2021-11-12 20:09:51 +09:00
Yan Zhulanow 8d18fa2d00 [FIR IDE] Ensure prefixed test output file differs from the default one 2021-11-12 20:09:50 +09:00
Ivan Kylchik 37f02390ec [TESTS] Extract common backend directives into ConfigurationDirectives 2021-11-08 23:50:33 +03:00
Jinseong Jeon 6d150fb7a5 FIR IDE: add APIs about FunctionClassKind 2021-11-08 20:12:17 +01:00
Ilya Kirillov 6453f2bdbf Analysis API: simplify scope hierarchy 2021-11-05 15:46:09 +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 197079c85c FIR IDE: make smartcast API return unstable smartcasts 2021-11-04 16:00:37 +01:00
Ilya Kirillov d63c136854 Analysis API: recreate analysis session when not found by resolve state 2021-11-04 12:04:54 +01:00
Jinseong Jeon c3c79b874d FIR IDE: make constant evaluator robust to arithmetic exception 2021-11-01 22:50:47 +01:00
Jinseong Jeon 3f2c86afb8 FIR IDE/LC: introduce/use delegated member scope 2021-10-27 17:06:32 +02:00
Yan Zhulanow b7044803d2 [FIR IDE] Move out-of-block modification trigger to FrontendApiTestConfiguratorService 2021-10-20 19:41:29 +03:00
Yan Zhulanow 2894f87541 [FIR IDE] Move test configurators as constructor parameters 2021-10-20 19:41:29 +03:00
Yan Zhulanow 8f39640237 [FIR IDE] Move test file analysis in FE10 Analysis API implementation to FrontendApiTestConfiguratorService 2021-10-20 19:41:28 +03:00
Yan Zhulanow 516dd825c2 [FIR IDE] Initial descriptor-based implementation of the Analysis API 2021-10-20 19:41:24 +03:00
Yan Zhulanow e2c9be0932 [FIR IDE] Extract common components of the Analysis API to separate modules 2021-10-20 19:41:23 +03:00