Irene Dea
fad3c1f2f6
Add initial type attributes infra
2022-01-08 15:25:06 +03:00
Ilya Kirillov
78db89b46b
Extract AbstractBinaryClassAnnotationLoader to be used without FE1.0
2021-12-27 16:23:08 +03:00
Vyacheslav Gerasimov
bc2f0936bd
Build: Rename commonDep -> commonDependency
2021-12-16 21:48:19 +03:00
Victor Petukhov
24900630cb
Revert "Revert "[FE 1.0] Provide an API to clean compile time initializer cache for variable descriptor""
...
This reverts commit faeb5d21ab .
2021-12-14 14:21:46 +03:00
Nikolay Krasko
faeb5d21ab
Revert "[FE 1.0] Provide an API to clean compile time initializer cache for variable descriptor"
...
This reverts commit 0e6762acc3 .
2021-12-10 16:54:55 +03:00
Victor Petukhov
0e6762acc3
[FE 1.0] Provide an API to clean compile time initializer cache for variable descriptor
2021-12-09 16:15:24 +03:00
Leonid Startsev
767c570af4
Load default values for annotation members from classfiles
...
so that defaults are available to synthetic implementations.
#KT-48181 Fixed
Implementation is for JVM IR; other backends & FIR need to be supported
separately.
2021-12-07 10:10:04 +00:00
Anastasiya Shadrina
a39fbd3822
[FE] Add getContextReceivers to CallableDescriptor interface
2021-12-02 20:23:17 +03:00
Dmitriy Novozhilov
01c0cf80d0
[FIR] Support @kotlin.jvm.PurelyImplements annotation
2021-11-22 17:01:17 +03:00
Alexander Udalov
1b5e3f5d51
Deserialize repeated annotations inside implicit container
...
#KT-49651 Fixed
2021-11-18 15:33:34 +01:00
Dmitriy Novozhilov
93378b1a04
[FE 1.0] Resolve private constructors of sealed classes same as for regular classes
...
^KT-44866
^KT-49729
2021-11-18 13:54:05 +03:00
Tianyu Geng
8ba2e4d221
FIR: move JavaAnnotationMapper.javaToKotlinNameMap to common
...
so that FIR IDE logic can reference it
2021-11-04 20:52:50 +01:00
Victor Petukhov
d015d3bc0e
Don't enhance previously erased value parameters for jspecify strict mode
...
^KT-48261 Fixed
2021-10-26 19:37:55 +03:00
Yan Zhulanow
516dd825c2
[FIR IDE] Initial descriptor-based implementation of the Analysis API
2021-10-20 19:41:24 +03:00
Georgy Bronnikov
41e38d5a1a
JVM_IR: move serialized IR to a separate annotation
2021-10-02 00:56:46 +03:00
Victor Petukhov
0cb56be14f
Have "in type" for java fields to be able to check that type in assignment positions (against rhs' type)
...
^KT-46727 Fixed
2021-09-30 20:08:52 +03:00
Denis.Zharkov
4733a0d970
Refine naming: *TypeVariable -> *TypeParameter
2021-09-30 14:36:27 +03:00
Denis.Zharkov
9ac29e0714
Fix enhancement when mixing TYPE_USE and non-TYPE_USE annotations
2021-09-28 22:59:18 +03:00
Vyacheslav Gerasimov
ab146bd6d4
Build: Fix deprecated Gradle configurations usages
...
for migration to Gradle 7+ #KTI-559
2021-09-26 18:28:44 +03:00
Dmitry Gridin
a0d36d7e29
[core] annotation loader: pull up isRepeatableWithImplicitContainer to AbstractBinaryClassAnnotationAndConstantLoader to reuse from plugin
...
^KTIJ-19676
2021-09-22 04:54:28 +00: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
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
0d78bcebca
FE: rename an extension to avoid conflicts with FIR member
2021-09-06 13:11:20 +03:00
pyos
090b90f62e
FIR: load type qualifiers from module, package, and parent classes
2021-09-06 13:11:13 +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
Dmitriy Novozhilov
762d225bd7
Unify Deprecation classes from :core:compiler.common and :compiler:frontend modules
2021-09-02 15:04:06 +03:00
Hung Nguyen
a342c81a9f
KT-45777: Take snapshots and compute changes for Java classes
...
Create `JavaClassDescriptor`s for Java classes
Ignore anonymous and synthetic classes
as they can't impact recompilation.
Clean up handling of local and anonymous classes
Bug: KT-45777
Test: New JavaClassDescriptorCreatorTest
2021-09-01 13:29:17 +03:00
Ilmir Usmanov
1f8dd45c2b
Remove experimental coroutines support. Part 2
2021-08-30 14:21:57 +03:00
Dmitriy Novozhilov
e07512a847
Delegate refineType and prepareType in TypeCheckerState to special services
...
This is needed to add ability to create type system independent TypeCheckerState
2021-08-26 10:08:51 +03:00
Victor Petukhov
d730db094a
Don't look at raw type's arguments while enhancing super types
...
^KT-48172 Fixed
2021-08-20 13:10:45 +03:00
Victor Petukhov
63cefe228d
Extract computing raw type arguments into separate method
2021-08-20 13:10:42 +03:00
pyos
47d0211370
FE: do not enhance ? in jspecify NullMarked scope
...
No clue whether this should be done for `@TypeQualifierDefault` since it
appears to have no specification whatsoever.
#KT-48262 Fixed
2021-08-18 16:41:00 +03:00