Commit Graph

624 Commits

Author SHA1 Message Date
Ivan Kochurkin 55f33999f1 [FIR] Add REPEATED_ANNOTATION, REPEATED_ANNOTATION_WARNING 2021-09-10 00:49:07 +03:00
Ivan Kochurkin fa12e72551 [FIR] Add REPEATABLE_CONTAINER_* diagnostics
REPEATABLE_CONTAINER_MUST_HAVE_VALUE_ARRAY
REPEATABLE_CONTAINER_HAS_NON_DEFAULT_PARAMETER
REPEATABLE_CONTAINER_HAS_SHORTER_RETENTION
REPEATABLE_CONTAINER_TARGET_SET_NOT_A_SUBSET
REPEATABLE_ANNOTATION_HAS_NESTED_CLASS_NAMED_CONTAINER
2021-09-10 00:49:07 +03:00
Ivan Kochurkin cfd2835254 [FIR] Add JVM Default diagnostics 2021-09-10 00:48:59 +03:00
Dmitriy Novozhilov 405670e111 Merge :compiler:fir:jvm module into :compiler:fir:java 2021-09-09 17:20:14 +03:00
pyos f793afbfea FE: do not enhance ? into ? extends @NotNull Object in JSR-305
This is already done in jspecify and makes more sense anyway.
2021-09-08 16:54:17 +03:00
pyos 0d78bcebca FE: rename an extension to avoid conflicts with FIR member 2021-09-06 13:11:20 +03:00
pyos 9bb7a29baa FIR: disregard enhancements for warnings
Warnings are not implemented yet, so don't produce errors either.
2021-09-06 13:11:16 +03:00
pyos a475453a01 FIR: enable useCorrectedNullabilityForFlexibleTypeParameters
It's necessary for correct substitution of `T & Any` with `T = V..V?`.
2021-09-06 13:11:16 +03:00
pyos 8163acb964 FIR: rearrange some stuff in Java type conversion code 2021-09-06 13:11:14 +03:00
pyos 090b90f62e FIR: load type qualifiers from module, package, and parent classes 2021-09-06 13:11:13 +03:00
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