Dmitriy Novozhilov
0f6b6dbca3
[FIR] Cleanup and reorganize utils in :compiler:fir:checkers
2021-09-15 17:11:31 +03:00
Dmitriy Novozhilov
9d09b9605f
[FIR] Cleanup and reorganize utils in :compiler:fir:java
2021-09-15 17:11:30 +03:00
Dmitriy Novozhilov
7a347b11e3
[FIR] Use StandardClassIds instead of StandardNames everywhere it's possible
2021-09-15 17:11:30 +03:00
Dmitriy Novozhilov
5c2a3bb78e
[FIR] Move duplicating names and classIds to StandardClassIds
2021-09-15 17:11:29 +03:00
Alexander Udalov
e857966edb
JVM: remove support for disabling NoConstantValueAttributeForNonConstVals
...
This feature is enabled by default since 1.4, which is the earliest
language version supported by Kotlin at this moment.
2021-09-14 22:29:12 +02:00
Ilya Kirillov
a8d321db63
FIR IDE: do not use FE1.0 compiler jars in frontend-independent-modules
2021-09-14 14:45:43 +02:00
Ivan Kochurkin
a816bd9a33
[FIR] Add JVM_INLINE_WITHOUT_VALUE_CLASS, VALUE_CLASS_WITHOUT_JVM_INLINE_ANNOTATION
2021-09-13 20:49:00 +03:00
Dmitriy Novozhilov
5769d42248
[FIR] Fix all usages of annotations due to new FirAnnotation hierarchy
2021-09-13 13:53:12 +03:00
Dmitriy Novozhilov
70e8d23d6b
Fix new warnings in project code
2021-09-12 16:19:33 +03:00
Nikolay Lunyak
56b2a984ce
[FIR] Quick fix FirModifierChecker
2021-09-11 22:05:35 +03:00
Aleksei.Cherepanov
cc5382b37e
[JPS] Fix incremental build after changing Java constant
...
InlineConstantTracker implemented for tracking changed java static final constants, that used in kotlin.
#KT-46506 Fixed
2021-09-11 13:00:00 +03:00
Ivan Kochurkin
8cdb79f969
Move JvmNames, JvmFieldApplicabilityProblem to common.jvm module
2021-09-10 00:49:10 +03:00
Ivan Kochurkin
69a13a3269
[FIR] Use getAnnotationByClassId instead of getAnnotationByFqName in JVM checkers
2021-09-10 00:49:09 +03:00
Ivan Kochurkin
2baed77598
[FIR] Add JVM_SYNTHETIC_ON_DELEGATE diagnostic
...
Extract JVM names to common JvmNames
2021-09-10 00:49:03 +03:00
Ivan Kochurkin
e3805c9b98
Extract JvmNames, JvmFieldApplicabilityProblem to compiler.common
2021-09-10 00:49:01 +03:00
Nikolay Lunyak
7006426304
[FIR] Add support for JVM_STATIC_ON_CONST_OR_JVM_FIELD diagnostic
2021-09-09 20:18:49 +03:00
Nikolay Lunyak
c2e5583780
[FIR] Add support for JVM_STATIC_NOT_IN_OBJECT_OR_COMPANION diagnostic
2021-09-09 20:18:49 +03:00
Nikolay Lunyak
5607be3920
[FIR] Add support for INAPPLICABLE_JVM_NAME diagnostic
2021-09-09 20:00:36 +03:00
Dmitriy Novozhilov
15b77045ee
[FIR] Remove all usages of classes and methods from FE 1.0 from FIR checkers
2021-09-09 17:20:21 +03:00
Jinseong Jeon
9e7ee2fdea
Unify and use default value parameter name in default setter
2021-09-09 16:07:09 +02:00
Jinseong Jeon
cd4a08cb18
Migrate ReadWriteAccess and checker logic (from frontend-independent)
2021-09-09 16:07:09 +02:00
Mikhail Glukhikh
ffbd574a08
Use -opt-in instead of -Xopt-in in comments and scripts
2021-09-08 23:43:55 +03:00
pyos
94402ba488
FE: prefer enhancements for errors over enhancements for warnings
2021-09-08 16:54:17 +03:00
pyos
8f699248f1
FE: force flexibility on unannotated ?
...
TODO: unify this code with FIR
#KT-48515 Fixed
2021-09-08 16:54:17 +03:00
pyos
afa1d18cc2
FE: in NullMarked scope, enhance T! to at least T
...
#KT-44436 Fixed
2021-09-08 16:54:17 +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
34ae5387b3
FE: clean up typeEnhancement.kt a bit
2021-09-08 16:54:17 +03:00
Alexander Udalov
5dbf5b1d45
Cleanup type enhancement, remove ValueParameterData
...
`ValueParameterData.hasDefaultValue` is now always equal to the original
value parameter's `declaresDefaultValue` flag, so `ValueParameterData`
usages can be simplified to just `KotlinType`.
2021-09-07 19:05:48 +02:00
Alexander Udalov
7e43000d9b
JVM: do not lose default parameter values during enhancement
...
The change in signatureEnhancement.kt in 432f581cb2 was incorrect.
Contrary to its name, the removed method `hasDefaultValueInAnnotation`
checked not only if the enhancement annotation has default value (which
is what the removed feature was about), but also if the parameter itself
declares default value. This was mistakenly substituted by just `false`
on line 234. The correct change is to use the `declaresDefaultValue`
flag of the original parameter.
It's kind of weird though that in case there's a nullability annotation
on the whole package (like in KT-48316) type enhancement is being done
on everything, including annotation constructors, whose parameter types
can't have any enhancement information. Maybe this should be improved
independently.
#KT-48316 Fixed
2021-09-07 19:05:48 +02:00
pyos
9ee0d6b60a
FE: don't use an experimental stdlib function
...
...for compatibility? idk.
2021-09-06 13:11:21 +03:00
pyos
0d78bcebca
FE: rename an extension to avoid conflicts with FIR member
2021-09-06 13:11:20 +03:00
pyos
476513fe96
FIR: rename type parameter: Annotation -> TAnnotation
2021-09-06 13:11:18 +03:00
pyos
090b90f62e
FIR: load type qualifiers from module, package, and parent classes
2021-09-06 13:11:13 +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
c85329905c
FE: remove ? enhancement code that is never used
...
Using `starProjectionType` to enhance `?` is pointless because
1. we explicitly ignore nullability annotations for `?` below;
2. mutability is irrelevant;
3. `starProjectionType` never returns references to other type
parameters due to how the type substitutor works.
2021-09-06 13:11:01 +03:00
pyos
a8b09a2016
FE: extract FIR-reusable code from SignatureParts
2021-09-06 13:11:00 +03:00
pyos
b31925e6c9
FE: slowly refactor extractQualifiersFromAnnotations 3
2021-09-06 13:10:59 +03:00
pyos
5c8d3180f7
FE: slowly refactor extractQualifiersFromAnnotations 2
2021-09-06 13:10:59 +03:00
pyos
9af8abb8b9
FE: slowly refactor extractQualifiersFromAnnotations 1
...
That code is convoluted, better take it slow to avoid accidentally
breaking (or fixing) anything.
2021-09-06 13:10:58 +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
19a9de32f8
FE: move SignatureParts out of SignatureEnhancement
2021-09-06 13:10:55 +03:00
pyos
56d37c8e1c
FE: separate type enhancement and FunctionN@Java warnings
2021-09-06 13:10:55 +03:00
pyos
f4f9b1b27b
FE: refactor propagation of type qualifier defaults though arguments
2021-09-06 13:10:54 +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
pyos
29a240b261
FE: refactor AnnotationTypeQualifierResolver
...
Preparing for commonization with FIR
2021-09-06 13:10:51 +03:00
Dmitriy Novozhilov
d46e2dd749
Fix OVERRIDE_DEPRECATION warnings in project code
2021-09-02 15:04:07 +03:00
Dmitriy Novozhilov
69c3831865
Rename Deprecation to DeprecationInfo
2021-09-02 15:04:07 +03:00