Dmitriy Novozhilov
5cfa8694d4
[FIR] Fix all usages of declarationSiteSession
2021-05-14 14:30:27 +03:00
Dmitriy Novozhilov
c523379e6a
[FIR] Move out all JVM specific deserialization logic from AbstractFirDeserializedSymbolsProvider
2021-05-14 14:30:23 +03:00
Dmitriy Novozhilov
e8c4b0e947
[FIR] Rename KotlinScopeProvider to FirKotlinScopeProvider
2021-05-14 14:30:22 +03:00
Dmitriy Novozhilov
4ad7a4a2d1
[FIR] Split KotlinDeserializedJvmSymbolsProvider to common and JVM specific parts
2021-05-14 14:30:21 +03:00
Dmitriy Novozhilov
d114913cd2
Replace usages of addToStdlib.firstNotNullResult with firstNotNullOfOrNull
2021-05-14 14:30:19 +03:00
Mikhail Glukhikh
7ee6597873
FIR: make inference context mandatory in withNullability() etc.
2021-05-05 17:35:50 +03:00
Dmitriy Novozhilov
d4162f876f
[FIR] Fix some warnings
2021-04-22 14:32:06 +03:00
Dmitriy Novozhilov
234ab3b35d
[FIR] Fix all illegal usages of declarationSiteSession in compiler
...
There are still some usages in IDE which should be investigated
2021-04-22 14:32:04 +03:00
Dmitriy Novozhilov
f98f41bbc3
[FIR] Rename session to declarationSiteSession in declaration builders
2021-04-22 14:32:03 +03:00
Dmitriy Novozhilov
c3b1be1a39
[FIR] Rename FirDeclaration.session to declarationSiteSession
2021-04-22 14:32:02 +03:00
Ilya Kirillov
a76c5d66eb
FIR: introduce FirDeclarationBuilder as a base class for all FIR declaration builders
2021-04-21 21:16:58 +03:00
Ilya Kirillov
39b2cd1027
FIR: do not provide symbols with different ClassId in JavaSymbolProvider
...
JavaSymbolProvider uses KotlinPsiElementFinderWrapper for finding classes.
CliFinder looks for Java classing assuming that class with ClassId=a/b/C
lives in directory a/b and do not look into real package name of Java class.
This causes that we may find some classes which we should not see from current scope.
Also, the IDE implementation works correctly here (it also checks file package)
which cause different behaviour of FIR IDE and FIR
This change also requires to fix testdata and make Java classes live
in directory consistent with file package
2021-04-15 15:23:53 +03:00
Ting-Yuan Huang
6c989bfd4b
Support array of annotation in KotlinJvmBinaryClass
...
KotlinJvmBinaryClass.AnnotationArrayArgumentVisitor didn't cover the
case when the element type is an Annotation. Therefore, when the
compiler read an array of annotations from JVM binary classes built from
Kotlin sources, it got an empty array regardless of what was written in
the bytecode.
For example, Foo.value below is read as an empty array when SomeClass
resides in another Kotlin module.
@Foo(
value = [Bar(1), Bar(2)]
)
class SomeClass
2021-04-14 13:14:26 +02:00
Mikhail Glukhikh
9af1de272e
FIR: support private-in-file effective visibility
2021-04-08 09:41:26 +03:00
Abduqodiri Qurbonzoda
19116e5623
Migrate compiler and others from sumBy to sumOf
2021-04-08 03:48:02 +03:00
Igor Yakovlev
d05ef3a635
[FIR] Move standard class id's into common module
2021-04-07 11:25:21 +02:00
Dmitriy Novozhilov
3ef87d0265
[FIR] Add effective visibility to resolved status
...
This commit includes:
- introduce FirResolvedDeclarationStatus.effectiveVisibility
- replace FirEffectiveVisibility with EffectiveVisibility
- move calculation of effective visibility from FirEffectiveVisibilityResolver
(which is deleted) to FirStatusResolver and FirDeserializer
2021-04-06 12:30:46 +03:00
Ilya Kirillov
5ceec858aa
FIR IDE: do not search for sealed class inheritors on every class resolve
2021-04-02 17:15:30 +02:00
Denis.Zharkov
1f074326bf
FIR: Fix Java scope in case of accessor with getter signature from supertype
...
^KT-45584 Fixed
2021-03-31 15:57:02 +03:00
pyos
6c11751c55
FIR: infer non-error types for unnamed annotation arguments
2021-03-30 16:20:01 +03:00
Ilya Chernikov
f8d50d585d
FIR: Implement lookup tracking
2021-03-24 21:24:18 +01:00
pyos
651fd4ad9f
FIR: load Java annotation defaults after binding the class symbol
...
as they can refer to the class itself.
2021-03-24 16:09:25 +03:00
Dmitriy Novozhilov
f4afc2ef44
[FIR] Map dispatch receiver type of function in JvmMappedScope
2021-03-24 12:56:16 +03:00
Mikhail Glukhikh
e7129329d2
Revert "FIR: do not eagerly resolve class references in imported annotations"
...
This reverts commit 1a57d60f
2021-03-15 18:36:13 +03:00
pyos
1a57d60f68
FIR: do not eagerly resolve class references in imported annotations
2021-03-15 17:32:39 +03:00
Mikhail Glukhikh
c641fa739b
FIR: provide 'replaceSource' only for FirQualifiedAccess inheritors
2021-03-15 15:33:38 +03:00
Dmitriy Novozhilov
3d1f4b8386
[FIR] Don't add @EnhancedVisibility to types with @Nullable annotation
2021-03-15 12:13:06 +03:00
Dmitriy Novozhilov
932eed2c14
[FIR] Fix determining nullability of arguments during enhancement
2021-03-11 13:10:05 +03:00
Dmitriy Novozhilov
65ea4e184a
[FIR] Fix enhancement of FlexibleNullability and EnhancedNullability
...
- Add utilities to add new attribute to ConeAttributes
- Get rid of FlexibleNullability attribute (it can be easily inferred
for any flexible type at any moment)
- Fix determining of EnhancedNullability attribute
2021-03-11 13:10:04 +03:00
Dmitriy Novozhilov
bd7689d381
[FIR] Properly compute default arguments of java annotations
2021-03-05 13:00:11 +03:00
Dmitriy Novozhilov
d45709993e
[FIR] Support reading annotations of properties from interfaces in different jvm default modes
2021-03-02 19:11:28 +03:00
Dmitriy Novozhilov
a7e6667648
[FIR] Properly deserialize annotations of properties in interfaces
2021-03-02 19:11:24 +03:00
Dmitriy Novozhilov
af79265f42
[FIR] Fix creating overrides for functions with name same as renamed in JVM builtins
2021-03-02 19:11:15 +03:00
Mikhail Glukhikh
2bf3abcb29
FIR: cache accessor symbols in JavaClassUseSiteMemberScope
2021-02-26 12:27:07 +03:00
Mikhail Glukhikh
750a39a053
JavaClassUseSiteMemberScope: optimize createOverridePropertyIfExists
...
Avoid calculating getter & setter twice
2021-02-26 12:27:01 +03:00
Ilya Kirillov
83f8650e80
Move CallableId from fir module to compiler.common to use in IDE
2021-02-24 20:13:41 +01:00
Denis.Zharkov
fb8314f6e7
FIR: Fix enhancement of property overrides accessors in Java
2021-02-20 10:59:21 +03:00
Denis.Zharkov
45018ea468
FIR: Rework loading overrides of special built-in methods from Java
...
Some of the changed data is correct, but some diagnostics are incorrect
Corner cases like having both contains(Object) and contains(String)
within implementation of Collection<String> is not supported
2021-02-20 10:59:21 +03:00
Denis.Zharkov
4b0aeb7105
FIR2IR: Support initialSignatureDescriptor
...
It will be used for overrides of renamed special built-ins during signature mapping
to obtain initial signature
2021-02-20 10:59:21 +03:00
Denis.Zharkov
3e420ca4e3
FIR: Introduce FirDeclarationOrigin.BuiltIns
2021-02-20 10:59:21 +03:00
Denis.Zharkov
5d5228cfc5
FIR: Require FirJavaClass in JavaScopeProvider
2021-02-20 10:59:20 +03:00
Denis.Zharkov
04f53d6a23
FIR: Simplify JavaScopeProvider
...
::wrapScopeWithJvmMapped is only needed for built-in classes defined in Kotlin
2021-02-20 10:59:20 +03:00
Denis.Zharkov
6766c8fe47
FIR: Simplify supertypes scopes computation
2021-02-20 10:59:20 +03:00
Dmitriy Novozhilov
1c0d862e40
[FIR] Don't smartcast variables to invisible types
...
#KT-44802 Fixed
2021-02-20 10:23:33 +03:00
Mikhail Glukhikh
742f1e0069
FIR: add replaceSource to all FIR tree nodes
2021-02-19 18:24:45 +03:00
Alexander Udalov
3432f581cb
Remove compiler support for kotlin-annotations-android
...
#KT-44815
2021-02-15 17:23:44 +01:00
Simon Ogorodnik
3909e3c54c
Decouple TypeCheckerContext and TypeSystemContext
2021-02-15 18:28:58 +03:00
Dmitriy Novozhilov
0c4bca4bde
[FIR] Fix warnings in FIR modules and enable -Werror in them
2021-02-12 14:50:46 +03:00
Dmitriy Novozhilov
96038e4b32
[FIR] Support java sealed class interop
2021-02-09 16:04:40 +03:00
Dmitriy Novozhilov
38437fb036
[FIR] Rename session.firSymbolProvider to session.symbolProvider
...
to avoid visual conflicts with `session.firProvider`
2021-02-09 16:04:39 +03:00