Commit Graph

764 Commits

Author SHA1 Message Date
pyos bff4b8639b FIR: remove FirJavaEnhancementContext 2021-09-06 13:11:12 +03:00
pyos 6f4b5cc73a FIR: expect Java type parameter bounds to be converted first 2021-09-06 13:11:11 +03:00
pyos ba1fc81b96 FIR: remove extra layers of caching above JavaSymbolProvider
There needs to be exactly one postcompute-aware cache in order to avoid
breaking recursive calls to getClassLikeSymbolByFqName.
2021-09-06 13:11:10 +03:00
pyos 2847de10ac FIR: enhance Java super types 2021-09-06 13:11:09 +03:00
pyos 03304bce96 FIR: enhance Java type parameter bounds
This also fixes handling of self-recursive types.

TODO: fix jspecify/{strict,warn}Mode/Captured.fir.kt
2021-09-06 13:11:08 +03:00
pyos e2a48d3945 FIR: use frontend-independent Java type qualifier computation 2021-09-06 13:11:07 +03:00
pyos e385484994 FIR: when translating raw types, reuse computed upper bounds
Also, don't bother ensuring that the upper bound has the same tree size
as the lower bound; the new index computation can handle it when some
subtrees of the lower bound are replaced by star projections in the
upper bound.
2021-09-06 13:11:06 +03:00
pyos 4654bdb199 FIR: replace 3 flags in Java type conversion with 1 enum 2021-09-06 13:11:05 +03:00
pyos 74b3634e1f FIR: move Java type conversion functions to a separate file 2021-09-06 13:11:05 +03:00
pyos 9cb6b75665 FIR: remove a couple unused type enhancement abstractions 2021-09-06 13:11:04 +03:00
pyos 5704dffdbe FIR: attach annotations to Java-converted cone types 2021-09-06 13:11:03 +03:00
pyos 5355d04553 FIR: enhance in/out-variant type arguments 2021-09-06 13:11:03 +03:00
pyos 8e122397b0 FIR: fix type index computation during enhancement
1. in/out type parameters count;
2. star projections take up 1 space in the tree.
2021-09-06 13:11:02 +03:00
pyos 8d39d155bb FE/FIR: extract common code for mutability qualifiers 2021-09-06 13:10:57 +03:00
pyos c753e547c6 FE/FIR: extract common code for type qualifier inheritance 2021-09-06 13:10:56 +03:00
pyos e0d0bf9ede FIR/FE: extract common code for type qualifier defaults 2021-09-06 13:10:54 +03:00
pyos 8bf5e86788 FIR/FE: extract common code for handling known nullability annotations 2021-09-06 13:10:53 +03:00
pyos 9349d4b0d2 FIR/FE: extract common AnnotationTypeQualifierResolver code
TODO: extract the equivalent code that uses it...
2021-09-06 13:10:52 +03:00
Mikhail Glukhikh a14a00809f FIR: use lookup tag instead of class id in visibility checker 2021-08-31 17:31:59 +03:00
Mikhail Glukhikh 08e498f1f2 FIR: add proper receiver check for protected visibility #KT-48378 Fixed 2021-08-31 17:31:57 +03:00
Mikhail Glukhikh 020b6e9dd1 FIR Java: fix conversion of primitive type 2021-08-27 18:03:02 +03:00
Mikhail Glukhikh 3f8734f694 FIR: determine synthetic accessor modality more precisely
Related to KT-47542
2021-08-24 12:32:30 +03:00
Igor Yakovlev 2ff4f10ff0 [FIR IDE] Fix SOE for FIR deserialized declarations provider 2021-08-19 21:26:07 +02:00
Denis.Zharkov 753ba99b04 FIR: Support enhanced types when checking if Java type is primitive 2021-08-17 21:38:01 +03:00
Denis.Zharkov c3a327e118 FIR: Fix ambiguity on Int2IntMap in IC 2021-08-17 21:38:01 +03:00
Ivan Kochurkin 8d764fa50e [FIR] Add FirPropertyAccessExpression that inherits FirQualifiedAccessExpression 2021-08-13 20:05:43 +03:00
Andrey Zinovyev 1b81018b69 [FIR] Fix overloading of renamed jvm methods
#KT-48102 Fixed
2021-08-09 15:22:06 +03:00
Alexander Udalov f8af127a4e Do not load Java @Repeatable for Kotlin-repeatable annotations
#KT-48131 Fixed
2021-08-06 22:47:36 +02:00
Denis.Zharkov edf9f5e647 FIR: Minor. Clarify name for containingClassForStaticMemberAttr 2021-08-03 16:24:46 +03:00
Ivan Kochurkin afb85026c4 Revert "[FIR] Implement INVISIBLE_SETTER"
This reverts commit b3d7ed56
2021-08-02 20:10:22 +03:00
Simon Ogorodnik 7422571c72 [FIR] Fix cycle when loading nested enum within java annotation 2021-08-02 17:07:15 +03:00
Ivan Kochurkin b3d7ed569d [FIR] Implement INVISIBLE_SETTER 2021-07-30 18:07:34 +03:00
Igor Yakovlev e1c8f302a4 [FIR IDE] Make fir resolve phase volatile and remove locks 2021-07-26 23:08:54 +02:00
Igor Yakovlev 6869fbbfe5 [FIR IDE] Insert ensure resolve into checkers and scopes 2021-07-26 23:08:53 +02:00
Andrey Zinovyev 6ef4523555 [FIR] Cache callable names in some composite scopes 2021-07-20 14:25:16 +03:00
Dmitriy Novozhilov f3116cb64a Fix NON_EXHAUSTIVE_WHEN_STATEMENT warnings in project code 2021-07-20 13:33:46 +03:00
Dmitriy Novozhilov 3991383853 [FIR] Provide compiler light classes from all source modules 2021-07-20 10:33:44 +03:00
Dmitriy Novozhilov 8729421e7a [FIR] Add kind to all FirSessions 2021-07-20 10:33:43 +03:00
Dmitriy Novozhilov 7f20b83159 [FIR] Use proper moduleData in synthetic properties scope 2021-07-20 10:33:37 +03:00
Dmitriy Novozhilov 7008f02962 [FIR] Create fir classes for java annotations and enums with Final modality 2021-07-20 10:33:34 +03:00
Dmitriy Novozhilov 8df56af068 [FIR] Add forgotten settings of resolve phase 2021-07-13 10:31:22 +03:00
Dmitriy Novozhilov 51fc2e453f [FIR] Unity FirCallableDeclaration and FirCallableMemberDeclaration
After removal of all diamonds in FirDeclaration hierarchy
  FirCallableMemberDeclaration was only one inheritor of
  FirCallableDeclaration, so there is no need to keep them both
2021-07-13 10:31:20 +03:00
Dmitriy Novozhilov aa3a73c6c2 [FIR] Move JavaTypeEnhancementState to session component 2021-07-09 14:38:02 +03:00
Andrey Zinovyev de3f31cf78 [FIR] Partial implementation of DEPRECATION(_ERROR) diagnostics
No support for inheritance deprecations
and deprecations in qualifier's parts
2021-07-07 16:19:28 +03:00
Ilya Kirillov 51576c70b6 FIR: introduce package directive
The package directive is needed for KtElement -> FirElement mapping in IDE.
There should be some FirElement which will be result of mapping of elements
inside KtPackageDirective.
2021-07-06 22:49:50 +03:00
Victor Petukhov 39ffcd3ba6 User proper report level for compatqual nullability annotations 2021-07-06 09:54:26 +03:00
Victor Petukhov e16033f8d8 Add androidx recently nullability annotations 2021-07-06 09:54:26 +03:00
Victor Petukhov 4173f2d294 Don't forget jspecify annotation during extracting nullability from known annotations 2021-07-06 09:54:24 +03:00
Victor Petukhov 46d0b16142 Use new default settings for java nullability annotations in JavaTypeEnhancementState and get rid of all hardcoded defaults 2021-07-06 09:54:24 +03:00
Dmitriy Novozhilov 1593c4859d [FIR] Get rid of all conditional reads of FirDeclaration.resolvePhase 2021-07-04 13:29:03 +03:00