Commit Graph

147 Commits

Author SHA1 Message Date
Simon Ogorodnik d084cfb65b FIR HL API: Unwrap substitution overrides if it contains stub types 2021-12-15 22:23:15 +03:00
Tianyu Geng 4d2074fb66 Analysis API: allow creating type from type alias
There does not seem to be any reason to limit the type creator to only
create types of concrete class or object but not type alias.
2021-12-15 16:09:33 +03:00
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
Tianyu Geng f197fc93db Analysis API: add test for KtDiagnosticsProvider 2021-12-09 15:56:52 +03:00
Tianyu Geng b52dc15aa7 Analysis API: remove dispatch receiver type from XXXSubstitutionOverridesUnwrappingTest 2021-12-09 11:01:52 +01:00
Tianyu Geng 9153db2ecc FE1.0 Analysis API: rewrite KtFe10CallResolver 2021-12-09 11:01:52 +01: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
Tianyu Geng 53b3893738 Analysis API: rework data model of resolve call API 2021-12-06 12:40:42 +01:00
Tianyu Geng bc95733818 FIR LL API: resolve PSI elements to more specific FIR element
Compound access and implicit delegated constructor are mapped to FIR
elements that are way too broad.
2021-12-06 12:40:41 +01:00
Tianyu Geng e8f1af6140 Analysis API: introduce KtSignature 2021-12-06 12:40:41 +01:00
Ilya Kirillov 7440c726d0 Analysis API: fix invalid psi elements for constants and annotation values 2021-12-02 20:09:19 +01:00
Ilya Kirillov dc9c2aa39d Analysis API: add KDoc, small cosmetic improvements 2021-12-02 20:09:19 +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 5fbcf0d94a Analysis API: fix extra line rendering in DebugSymbolRenderer 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 0a5bbc0096 Analysis API: update rendering testdata after changing renderer 2021-12-02 20:09:18 +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 908a47810b Analysis API: make KtClassifierSymbol to be a KtPossibleMemberSymbol 2021-12-02 20:09:17 +01:00
Ilya Kirillov 9cb950a2ae Analysis API: extract PrettyPrinter from DebugSymbolRenderer to utils 2021-12-02 20:09:17 +01:00
Ilya Kirillov 8cb5283a7d Analysis API: fix file symbol restore 2021-12-02 20:09:17 +01:00
Ilya Kirillov 7919dae558 Analysis API: improve rendering of constant values 2021-12-02 20:09:17 +01:00
Ilya Kirillov 673459580c Analysis API: introduce annotation value for KClass 2021-12-02 20:09:16 +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
Ilya Kirillov a70c336c2c Analysis API: fix constructor return type for FE1.0 implementation 2021-11-30 18:02:33 +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 1335a2c3ab Analysis API: remove KtTypeRendererOptions.renderTypeArguments as unused 2021-11-22 22:47:20 +01: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 e440c229f6 Analysis API: improve annotations value rendering in DebugSymbolRenderer 2021-11-22 22:47:00 +01:00
Ilya Kirillov ba918d45a2 Analysis API: introduce KtInitializerValue for initializer of KtPropertySymbol 2021-11-22 22:46:59 +01:00
Ilya Kirillov 02adb1924b Analysis API: add tests to check annotations on declarations 2021-11-22 22:46:58 +01:00
Ilya Kirillov fff8eb244c Analysis API: add annotations to KtTypeAliasSymbol 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 193df3e3c4 Analysis API: fix annotation rendering for types 2021-11-22 22:46:55 +01:00
Ilya Kirillov 3a5e503f29 Analysis API: add KDocs to annotation related stuff 2021-11-22 22:46:55 +01:00
Ilya Kirillov bdde70312d Analysis API: update testdata after removing KtTypeAndAnnotations 2021-11-22 22:46:54 +01:00
Ilya Kirillov a5a5ff39d6 Analysis API: get rid of KtTypeAndAnnotations & add annotations for every type 2021-11-22 22:46:53 +01:00
Dmitriy Novozhilov 01c0cf80d0 [FIR] Support @kotlin.jvm.PurelyImplements annotation 2021-11-22 17:01:17 +03: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
Jinseong Jeon d91170ed2c FIR IDE: add more tests about resolving reference to type parameters 2021-11-18 17:33:17 +01:00
Ilya Kirillov 6f6a33e852 Analysis API: move testdata to corresponding components folders 2021-11-17 20:55:08 +01:00