Denis.Zharkov
4ad5f01324
FIR: Support overrides of generic-typed members with raw-typed ones
...
^KT-49070 Fixed
2021-10-20 22:05:25 +03:00
Mikhail Glukhikh
98d34b40ab
FIR: set substituteTypes value explicitly in calls inside providers
2021-10-20 12:17:04 +03:00
Dmitriy Novozhilov
bee44c6e0f
[FIR] Split :compiler:fir:resolve module into three different modules
...
Those modules are:
- :compiler:fir:providers, which contains Fir and Symbol providers,
scopes, and different utilities used by them
- :compiler:fir:semantics, which contains different abstractions and
entities which are used in resolution and in checkers
- :compiler:fir:resolve, which contains all stuff related to resolution
and inference
There are two pros of this change:
1. It may increase gradle build, because it allows to compile :fir:resolve
and :fir:checkers modules in parallel
2. Logic of working FIR (scopes, providers, DFA logic system, etc) is
now separated from logic of resolution phases, so for example checkers,
which are depend on scopes physically will not be able to run resolve
in any way
2021-10-18 11:10:47 +03:00
Dmitriy Novozhilov
6995ee9334
[FIR] Move type context and type approximator to separate session compontent
...
This is needed to decouple components which are related to type system
from type inference components
2021-10-18 11:10:47 +03:00
Dmitriy Novozhilov
eadb91f9b2
[FIR] Move accessors to main session components close to declarations of those components
2021-10-18 10:55:39 +03:00
Mikhail Glukhikh
f4067f05a2
FIR: forbid java.lang.String(String) constructor in JvmMappedScope
...
#KT-49135 Fixed
2021-10-15 01:24:51 +03:00
Dmitriy Novozhilov
b4d955838e
[FIR] Properly use FirContainingNamesAwareScope in all places
...
Split some delegating scopes to basic and name aware implementations
Also get rid of getContainingCallableNamesIfPresent and
getContainingClassifierNamesIfPresent functions because they are not
needed anymore
2021-10-12 17:26:43 +03:00
Dmitriy Novozhilov
af6d6ec2b9
[FIR] Properly collect constructors from class in presence of plugins
2021-10-12 17:26:41 +03:00
Dmitriy Novozhilov
9bfa6c54b8
[FIR] Inherit FirContainingNamesAwareScope from FirScope
...
This is needed to simplify FirScope hierarchy, because in
fact all inheritors of `FirContainingNamesAwareScope` were
inheritors of `FirScope` too
2021-10-12 17:26:29 +03:00
Denis.Zharkov
9d9f191f51
FIR: Fix exception caused by empty supertypes of java.lang.Object
2021-10-07 17:26:25 +03:00
Roman Golyshev
9b9c51bc8d
[FIR] Fix dispatch receivers on inner classes' constructors
...
1. Inner class constructor should have its outer class as a dispatch
receiver, since it is necessary for the call. Before it was null
2. Substituted inner class constructor should have its original dispatch
receiver type with the proper substitution. Before it was set to the
class itself (since the class was usually passed as a new dispatch
receiver)
Also, modify FIR renderer, so it properly renders the dispatch receiver
of the constructors
2021-10-05 12:17:08 +00:00
Ivan Kochurkin
75b40e4b75
[FIR] Add INVISIBLE_SETTER
2021-10-03 17:10:06 +03:00
Tianyu Geng
f35680f0a4
FIR checker: resolve property with protected getter and public setter
...
Assuming Java class `Super` has a protected `getName` method and a
public `setName` method.
Then, in a subclass of `Super`, FE1.0 allows calls to `setName` via the
property syntax if the property is protected and invisible due to
dispatch receiver is not `this` or `super`.
2021-09-29 19:39:12 +03:00
Denis.Zharkov
9ac29e0714
Fix enhancement when mixing TYPE_USE and non-TYPE_USE annotations
2021-09-28 22:59:18 +03:00
Denis.Zharkov
586dcae141
FIR: Avoid loading symbols when mapping Java type arguments
2021-09-23 16:58:26 +03:00
Denis.Zharkov
38fa900e56
FIR: Optimize case with no annotations on package
2021-09-23 16:58:26 +03:00
Denis.Zharkov
37785eb244
FIR: Rename KotlinDeserializedJvmSymbolsProvider -> JvmClassFileBasedSymbolProvider
2021-09-23 16:58:25 +03:00
Denis.Zharkov
0aa8181960
FIR: Rename AbstractFirDeserializedSymbolsProvider -> AbstractFirDeserializedSymbolProvider
2021-09-23 16:58:25 +03:00
Denis.Zharkov
54a97a860a
FIR: Minor. Rename JavaClassConverter -> FirJavaFacade
2021-09-23 16:58:24 +03:00
Denis.Zharkov
9902d36d57
FIR: Minor. Rename
2021-09-23 16:58:24 +03:00
Denis.Zharkov
1fc2f13a35
FIR: Pull creation of JavaClassConverter to session factory
2021-09-23 16:58:22 +03:00
pyos
36b02082a6
FIR: try to load as Java class if KotlinClassFinder returns null
...
The IDE implementation of KotlinClassFinder does not always return the
class file contents.
2021-09-15 19:15:17 +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
pyos
9fa3e2eb13
FIR: always load parents of nested classes first
2021-09-14 19:00:48 +03:00
pyos
032cf5a892
FIR: JavaSymbolProviderWrapper -> JavaSymbolProvider
2021-09-14 19:00:47 +03:00
pyos
30c8fa89f6
FIR: rename JavaSymbolProvider to JavaClassConverter
2021-09-14 19:00:46 +03:00
pyos
3a80cb1808
FIR: hide construction of JavaSymbolProvider
2021-09-14 19:00:45 +03:00
pyos
8ff79e002e
FIR: load parents of Java inner classes first, as before
2021-09-14 19:00:44 +03:00
pyos
cac0cf6a50
FIR: join KotlinDeserializedJvmSymbolsProvider and JavaSymbolProvider
...
This allows reusing class finder results.
2021-09-14 19:00:43 +03:00
Dmitriy Novozhilov
d1db9b17e5
[FIR] Add workaround for KT-48675
2021-09-13 13:53:13 +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
2e7564a21e
[FIR] Properly create FirAnnotation and FirAnnotationCall in all places
2021-09-13 13:53:12 +03:00
Dmitriy Novozhilov
4b662a42a1
[FIR] Rename FirAnnotationCall to FirAnnotation
2021-09-13 13:53:09 +03:00
Nikolay Lunyak
b72488b4c2
[FIR] Add replaceGetter & replaceSetter
2021-09-11 22:05:33 +03:00
Nikolay Lunyak
ee58df6b3c
[FIR] Add FirBackingField
2021-09-11 22:05:29 +03:00
Ivan Kochurkin
7c6326856b
[FIR] Use toFirRegularClassSymbol instead of toFirRegular in checkers
2021-09-10 00:49:11 +03:00
Ivan Kochurkin
ee37768808
[FIR] Rename getClassLikeSymbolFqName to getClassLikeSymbolByClassId
2021-09-10 00:49:10 +03:00
Ivan Kochurkin
f3e754f314
[FIR] Remove excess FirAnnotationContainer from some super types
2021-09-10 00:49:08 +03:00
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