Dmitriy Novozhilov
b0f38bd996
[FIR] Save mapping from supertype to delegated field in class attribute
...
This is needed to let checkers know which specific interface was
implemented by delegation
2021-11-23 15:01:21 +03:00
Dmitriy Novozhilov
e25fff701b
[FIR] Add FirClassLikeDeclarationChecker alias
...
Such checkers may be useful for checkers which are interested in all
inheritors of FirClassLikeDeclaration
2021-11-23 15:01:21 +03:00
Dmitriy Novozhilov
33f78e3903
[FIR2IR] Fix collecting declarations for Fir2IrLazyClass
...
Existed code might lose declarations in two cases:
1. When there is a declared function which is mapped to property
(java synthetic properties)
2. When class has property and function with same name
2021-11-23 15:01:20 +03:00
Dmitriy Novozhilov
307fa66dda
[FIR] Resolve imports before plugin annotation phase
...
This is needed to correctly resolve imported annotations from plugins
2021-11-23 15:01:18 +03:00
Dmitriy Novozhilov
9948ba57c0
[FIR] Add ability to generate companion object from compiler plugin
2021-11-23 15:01:15 +03:00
Dmitriy Novozhilov
75ed11a620
[FIR] Remove few unused utils
2021-11-23 15:01:10 +03:00
Dmitriy Novozhilov
75b6f7ca00
[FIR] Make FirRegularClass.companionObject companionObjectSymbol field
...
This is needed for two reasons:
1. Before this change companion object appeared in FirRegularClass
twice: in declarations list and in companionObject field. This may
trigger twice transform of it
2. It's very hard to implement generation of companion object by plugins
because if it is part of the tree then generated declaration must be
registered in FirProvider, which is inconsistent with other generated
declarations. Replacing FIR with symbol and removing custom logic of
visiting/transforming companion FIR allows us to just replace companionSymbol
in FirClass if plugin wants to generate it without any additional work
2021-11-23 15:01:05 +03:00
Ilya Goncharov
01deac5e5c
[Gradle, JS]Run kotlinNodeJsSetup ad kotlinYarnSetup instead of assemble
2021-11-23 11:41:20 +00:00
Ilya Goncharov
e32a1ca562
[Gradle, JS] Not resolve configuration with nodejs and yarn if it should not be downloaded
2021-11-23 11:41:19 +00:00
Svyatoslav Scherbina
5020d5f2f9
Native: make SymbolName internal
...
See ^KT-46649
2021-11-23 08:09:44 +00:00
Svyatoslav Scherbina
8bd1d7b2be
Native: allow jsinterop and cinterop (legacy sourcecode mode) using SymbolName
...
The interop Kotlin source generators still use `@SymbolName` to link
Kotlin code with platform code.
2021-11-23 08:09:44 +00:00
Svyatoslav Scherbina
d70eacb1b2
Native: remove the opt-in for SymbolName from stdlib
...
This annotation is no longer used there.
2021-11-23 08:09:43 +00:00
Svyatoslav Scherbina
6e0a152f39
Revert "[K/N] Replace SymbolName with GCUnsafeCall in interop"
...
This reverts commit ca9ec76c08 .
2021-11-23 08:09:43 +00:00
Svyatoslav Scherbina
7042d01271
Revert "[K/N] Emmit error on using @SymbolName with new mm"
...
This reverts commit 7e58660ce2 .
2021-11-23 08:09:42 +00:00
Dmitry Petrov
2179987de7
FIR2IR fix enum special methods generation
2021-11-23 06:34:33 +00:00
Dmitry Petrov
2a263eca65
FIR2IR strip annotations from IrConst type
2021-11-23 06:34:03 +00:00
Alexander Udalov
0048540652
Prepare kotlinx-metadata-jvm 0.4.0 for release
2021-11-23 02:17:01 +01:00
Ilya Kirillov
1335a2c3ab
Analysis API: remove KtTypeRendererOptions.renderTypeArguments as unused
2021-11-22 22:47:20 +01:00
Ilya Kirillov
1d1f5ace8f
Analysis API: rename KtCallableSymbol.type -> returnType
2021-11-22 22:47:01 +01:00
Ilya Kirillov
9d6da14847
Add run configurations for running Analysis API Tests
2021-11-22 22:47:01 +01:00
Ilya Kirillov
d0318f1026
Analysis API: add test for file annotations
2021-11-22 22:47:00 +01:00
Ilya Kirillov
e440c229f6
Analysis API: improve annotations value rendering in DebugSymbolRenderer
2021-11-22 22:47:00 +01:00
Ilya Kirillov
ba918d45a2
Analysis API: introduce KtInitializerValue for initializer of KtPropertySymbol
2021-11-22 22:46:59 +01:00
Ilya Kirillov
02adb1924b
Analysis API: add tests to check annotations on declarations
2021-11-22 22:46:58 +01:00
Ilya Kirillov
fff8eb244c
Analysis API: add annotations to KtTypeAliasSymbol
2021-11-22 22:46:57 +01:00
Ilya Kirillov
22cbcfb3c4
Analysis API: do not require tests to call super.doTestByFileStructure
2021-11-22 22:46:57 +01:00
Ilya Kirillov
a084ad59de
Analysis API: add test for annotations on types
2021-11-22 22:46:56 +01:00
Ilya Kirillov
193df3e3c4
Analysis API: fix annotation rendering for types
2021-11-22 22:46:55 +01:00
Ilya Kirillov
3a5e503f29
Analysis API: add KDocs to annotation related stuff
2021-11-22 22:46:55 +01:00
Ilya Kirillov
bdde70312d
Analysis API: update testdata after removing KtTypeAndAnnotations
2021-11-22 22:46:54 +01:00
Ilya Kirillov
a5a5ff39d6
Analysis API: get rid of KtTypeAndAnnotations & add annotations for every type
2021-11-22 22:46:53 +01:00
Ivan Kylchik
83d2d2cfcf
[JS TESTS] Disable node js runner for IR
2021-11-22 21:06:42 +03:00
Ivan Kylchik
3aa88a6ebe
[JS TESTS] Allow saving artifacts into build directory on teamcity
...
This is required to properly run node js tests.
2021-11-22 21:06:40 +03:00
Dmitriy Novozhilov
9c7058c3c5
[FIR] Support fields as part of graph of class initialization
...
^KT-49747 Fixed
2021-11-22 20:22:22 +03:00
Dmitriy Novozhilov
5778cb440f
[FIR] Add FirControlFloGraph owner supertype to FirField
...
FirField, just like FirProperty, can have control flow graph of it's
intializer
2021-11-22 20:22:19 +03:00
Roman Artemev
3bef04cf5e
Fix test and unmute it for JVM
2021-11-22 19:00:43 +03:00
Victor Petukhov
d48557ed53
[FE 1.0] Fix containing KtFile check in NewResolutionOldInference.kt
2021-11-22 17:01:49 +03:00
Dmitriy Novozhilov
9807c67ae4
[FIR] Properly collect overriddens for method enhancement
...
If some java class has multiple supertypes then we need to collect
overriddens from all those types directly, even if superTypeScope
(which is FirTypeIntersectionScope in this case) returns only
one symbol from one of this types (not intersection one)
This is needed to proper enhancement in cases when some type occurs
multiple times in supertypes graph with different nullability
of arguments:
class ConcurrentHashMap<K, V> : AbstractMap<K!, V!>, MutableMap<K, V>
If we try to find method `get(key: K): V` supertype scope returns
`AbstractMap.get(key: K!): V!` (because it actually overrides
`MutableMap(key: K): V?`), but we need to get both symbols to
properly enhance types for `ConcurrentHashMap.remove`
2021-11-22 17:01:17 +03:00
Dmitriy Novozhilov
01c0cf80d0
[FIR] Support @kotlin.jvm.PurelyImplements annotation
2021-11-22 17:01:17 +03:00
Dmitriy Novozhilov
339c69fef0
[FIR] Collect all supertypes with same type constructor in corresponding supertypes cache
...
This is needed to fir behavior of cache with algorithm in
abstract type checker
2021-11-22 17:01:17 +03:00
Dmitriy Novozhilov
d72fcc92fe
[FIR] Add utility function for collecting overridden tree for debug purposes
2021-11-22 17:01:16 +03:00
Dmitriy Novozhilov
6edf191b7f
[FIR] Save classId in declared and use site scopes
...
This is needed for debug purposes, because without classId or reference
to class it's very hard to understand which scope you are observing
in debugger
2021-11-22 17:01:16 +03:00
Viacheslav Kormushkin
a695d9bf59
KT-49771 - podInstall task is not executed after adding a pod dependency to the shared module
...
#KT-49771
2021-11-22 13:19:03 +00:00
Ilya Goncharov
f48436b35e
rra/ilgonmic/eager-like-native
...
[JS IR] Leave JsEagerInitialization until bootstrap update
[JS IR] Fix js stdlib api
[JS IR] Change annotation on eager initialization in sources
[JS IR] Make eager initialization consistent with native
Merge-request: KT-MR-5030
2021-11-22 12:45:37 +00:00
Ilya Goncharov
24bc1fe1b4
[JS IR] Add test with extending exported interface
2021-11-22 12:40:28 +00:00
Ilya Goncharov
6f3985be47
[JS IR] Add test on frontend check with enum exportness
...
^KT-49754 fixed
2021-11-22 12:40:28 +00:00
Ilya Goncharov
a46c4cf0a5
[JS IR] Fix exportable super types for enum
...
^KT-49754 fixed
2021-11-22 12:40:27 +00:00
Sergej Jaskiewicz
756b58d5ce
[JS IR] Don't assume a single constructor in the Char class
2021-11-22 11:22:45 +00:00
Victor Petukhov
a6fd14d4e6
[FE 1.0] Eliminate resolution ambiguity on inherited SAM-interfaces
...
^KT-17765 Fixed
2021-11-22 14:18:30 +03:00
Victor Petukhov
a5c6d370dd
[FE 1.0] Eliminate resolution ambiguity with external type parameters
...
^KT-10926 Fixed
2021-11-22 14:18:29 +03:00