Commit Graph

467 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
Mikhail Glukhikh a4df0aaa7d FIR: Add test 2021-12-15 22:23:08 +03:00
Mikhail Glukhikh 2338281889 FIR: Add test for get class + let in delegation 2021-12-15 22:23:07 +03:00
Simon Ogorodnik 11ec23e5dc FIR: Make synthetic type variables fix to self-stub type if no info 2021-12-15 22:23:05 +03:00
Simon Ogorodnik 52145e0623 FIR: Respect nullability when substituting stub types 2021-12-15 22:23:02 +03:00
Simon Ogorodnik 2e69f7732c FIR: Add more tests for delegate inference 2021-12-15 22:22:57 +03:00
Mikhail Glukhikh a19495cb26 FIR: add test with resolve problem in delegate 2021-12-15 22:22:50 +03:00
Roman Golyshev 89c3e04a36 [FIR IDE] Rethrow IndexNotReadyException from KtFirReferenceResolver
Resolve can be called even when the indices are not ready. In such cases
the `IndexNotReadyException` can be intentionally ignored by the
platform code

To make our code play nice with the platform, from now on we do not
wrap `IndexNotReadyException` into another exception - instead we
just let it fly and be ignored by the platform. If the platform
doesn't choose to ignore it, then it will be showed as an error
as usual
2021-12-15 22:12:00 +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 a5844b754e Type Approximation: add separate flag to control approx. anonymous type
This extra flexibility is useful for IDE where we always want to
approximate anonymous types but may not want to approximate other local
 types
2021-12-15 16:09:27 +03:00
Jinseong Jeon 7757fd312b FIR LC: make fields in objects static 2021-12-15 08:20:03 +03:00
Jinseong Jeon 82c2f0c6fd FIR LC: use unified annotations' ClassId or FqName 2021-12-15 08:20:02 +03:00
Jinseong Jeon 9a669092e3 FIR LC: backward compatible visibility of enum entry ctor 2021-12-14 18:26:26 +03:00
Anastasia.Shadrina 343a860553 [FE] Make OverloadChecker take CR into account 2021-12-14 15:19:42 +03:00
Mikhail Glukhikh df50a8141f FirCallCompleter: unwrap definitely not-null type properly
#KT-50180 Fixed
2021-12-13 16:24:59 +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
Ivan Kochurkin f68c8f8f01 [FIR] Fix visibility issues with private members within inner and anonymous scopes ^KT-49992 Fixed 2021-12-09 12:31:24 +00:00
Ivan Kochurkin 800d594a4f [FIR] Check adding default error messages for all diagnostics ^KT-49973 fixed
Also, check for duplicates
2021-12-09 12:31:23 +00:00
Mikhael Bogdanov 7e99ba30f3 Remove obsolete USAGE_OF_JVM_DEFAULT_THROUGH_SUPER_CALL diagnostic
#KT-47000
2021-12-09 11:30:06 +01:00
Mikhail Glukhikh 533e802c8d FIR: support JVM_DEFAULT_WITH_COMPATIBILITY_* diagnostics (FE 1.0 sync) 2021-12-09 13:26:40 +03:00
Mikhail Glukhikh 178290eac3 FIR: drop JVM_DEFAULT_THROUGH_INHERITANCE diagnostic (FE 1.0 sync) 2021-12-09 13:26:39 +03:00
Jinseong Jeon f8a6ab9536 FIR LC: populate DefaultImpls if an interface has default implementations 2021-12-09 11:04:25 +01: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
Jinseong Jeon b9a56f4888 FIR LC: add static modifier to non-inner nested interfaces 2021-12-08 15:28:33 +01:00
Dmitry Petrov f55f880726 Minor: regenerate tests, update testData 2021-12-08 14:12:35 +03:00
Dmitry Petrov 1fd0dec5e7 FE KT-47939 callable references to functional interface constructors
Allow callable references to Kotlin 'fun interface' constructors.
Prohibit callable references to Java SAM interface constructors.
2021-12-08 14:12:33 +03:00
Ilmir Usmanov bb53ba4a2e Enable delegation by interface for inline classes in old FE
#KT-27435
2021-12-08 00:11:54 +01:00
Victor Petukhov 7475d26902 [FE 1.0] Implement checker to detect changed resolve for progressions and ranges due to the start of implementing Collection<T>
^KT-49276 Fixed
2021-12-07 18:48:27 +03:00
Mikhael Bogdanov a2395ec8bb Additional diagnostics for @JvmDefaultWithCompatibility 2021-12-06 14:20:25 +01:00
Tianyu Geng eeb4e4278d FE1.0 Analysis API: comment out KtFe10CallResolver for now 2021-12-06 12:40:43 +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 58067e0a1e FIR checker: carry original candidate in ConeDiagnosticWithCandidates
This is needed by IDE when resolving calls because candidates carry more
information than just the targeting symbol.
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
Anastasiya Shadrina 4d3035e2f7 [Parser] Do not support local contextual declarations 2021-12-03 20:22:17 +03:00
Dmitriy Novozhilov 1f0b62b25f [FIR] Add smartcasts from == if equals is from Any
^KT-49127 Fixed
2021-12-03 14:19:25 +03: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 22e31ea414 Analysis API FE1.0: fix invalid file scope 2021-12-02 20:09:19 +01:00