Artem Kobzar
ad78f27cce
[K/JS] Fix problem with dynamic return type inside coroutine
2022-11-23 21:33:56 +00:00
Pavel Kirpichenkov
cc93f3a87c
[MPP] Implement TCS dependency resolver for non-hierarchical deps
...
Resolves legacy common metadata dependencies and special common
libraries like kotlin-stdlib-common.
KT-54974
2022-11-23 20:56:57 +00:00
Sergey.Shanshin
339b152390
Implemented caching of child serializers
...
Resolves Kotlin/kotlinx.serialization#1918
Merge-request: KT-MR-7578
Merged-by: Sergey Shanshin <Sergey.Shanshin@jetbrains.com >
2022-11-23 19:53:44 +00:00
Egor Kulikov
3e8f7b8ee4
[FIR] Make enum entry initializer lazy in RawFirBuilder
...
Third step for KT-52615
Merge-request: KT-MR-7769
Merged-by: Egor Kulikov <Egor.Kulikov@jetbrains.com >
2022-11-23 18:55:21 +00:00
Ivan Kochurkin
194d1cfccf
[FIR] Filter out incorrect library provides for dependencyProviders
...
Get rid of providers duplication
2022-11-23 18:29:29 +00:00
Ivan Kochurkin
8883de3f00
[FIR] Don't resolve Enum.declaringClass and Enum.getDeclaringClass
...
^KT-53946 Fixed
2022-11-23 18:29:29 +00:00
Ivan Kochurkin
6e76978530
[FIR] Consider anonymous objects in FirSuperclassNotAccessibleFromInterfaceChecker
...
^KT-54673 Fixed
2022-11-23 18:29:28 +00:00
Ilya Goncharov
adeb31ebf6
Upgrade yarn.lock file
2022-11-23 16:02:19 +00:00
Dmitriy Novozhilov
c2d30c43bd
Advance bootstrap to 1.8.20-dev-2904
2022-11-23 14:53:29 +00:00
Ilya Goncharov
358943c7cb
[Gradle, JS] Fix warning in case when js target declared twice
...
^KT-55099 fixed
2022-11-23 12:48:35 +00:00
Mikhail Glukhikh
774bed875a
Fix opt-in related bootstrap problem in kotlin-native/build-tools
2022-11-23 12:00:09 +00:00
Mikhail Glukhikh
bf4d48e208
K2 opt-in checker: extract callable/class-like specific fragments
2022-11-23 12:00:09 +00:00
Mikhail Glukhikh
3e22f6c052
K2 opt-in: fix reporting of WasExperimental-bound errors
2022-11-23 12:00:08 +00:00
Mikhail Glukhikh
f62bdb0e3d
K1 opt-in: fix message/behavior for future error with WasExperimental
2022-11-23 12:00:08 +00:00
Mikhail Glukhikh
8ddc535caf
Opt-in: forbid/deprecate constructor call with default arguments under marker
...
#KT-55074 Fixed
2022-11-23 12:00:07 +00:00
Mikhail Glukhikh
b92ce68f32
K2 opt-in: restore marker annotation check for constructors
2022-11-23 12:00:07 +00:00
Mikhail Glukhikh
a77750a257
K2 opt-in: drop redundant recursive check for overridables
2022-11-23 12:00:06 +00:00
Mikhail Glukhikh
cd81f22bd3
K2 opt-in: extract specific checks for overridable experimentalities
2022-11-23 12:00:05 +00:00
Mikhail Glukhikh
a2f7224370
K2 opt-in: check callable parent class only in case of constructor call
2022-11-23 12:00:04 +00:00
Mikhail Glukhikh
73cb4d1a6e
K2 opt-in: don't take sub./int. override parent classes into account
...
#KT-54823 Fixed
2022-11-23 12:00:04 +00:00
Artem Kobzar
c1c5933c72
[K/JS] Deprecate old JS-compiler
2022-11-23 11:22:29 +00:00
Anton Bannykh
e42385dfb0
JS tests: split fir, ir, and legacy tests
...
Also split write FIR output to separate folders
2022-11-23 11:01:13 +00:00
Anton Bannykh
f99d480bf8
JS: move DCE test output to build/ dir
2022-11-23 11:01:13 +00:00
Anton Bannykh
56765461a0
WASM: move output to build/ dir
2022-11-23 11:01:12 +00:00
Anna Kozlova
43bd05f470
[LL FIR] make dependency from library on builtins invisible from outside
...
^KTIJ-23421
hide explicit builtins to reveal target platform dependencies.
Otherwise, `expect` class from builtin of e.g. JDK
would be found instead of actual dependency from Kotlin Runtime
2022-11-23 10:46:49 +00:00
Ilya Kirillov
28ff475dd6
Fix binary compatibility with android plugin for org.jetbrains.kotlin.platform.js.isJs
2022-11-22 21:04:09 +00:00
Nikolay Krasko
c414b4b29a
Update CODEOWNERS for scripts directory
2022-11-22 20:29:22 +00:00
Nikolay Krasko
4c16d7597a
Instructions for building 1.7.20 release
2022-11-22 20:29:21 +00:00
Nikolay Krasko
41d16b1376
Scripts for building Kotlin repository
2022-11-22 20:29:20 +00:00
Nikolay Lunyak
4b3dc008f0
[FIR] KT-54260: Fix the compiler crash
...
AllOpen plugin makes the properties all-open, but the annotation class
is left closed, because allopen for k2 literally checks
`classKind == CLASS`.
Since the properties are open, a
`NON_FINAL_MEMBER_IN_FINAL_CLASS` diagnostic is reported for them. It's
positioning strategy seeks for the explicit `open` modifier which is
not present.
The added test should not crash the compiler.
^KT-54260 Fixed
2022-11-22 20:25:38 +00:00
Jinseong Jeon
c79d65536b
Gracefully handle erroneous super type during local type approximation
...
^KTIJ-23528 Fixed
2022-11-22 20:16:40 +01:00
Ilya Kirillov
f775778efa
[Analysis API FIR] fix containing declaration for value parameter
...
now it should also work for non-source declarations
2022-11-22 18:25:30 +01:00
Ilya Kirillov
7781ad67d4
[FIR] introduce FirValueParameter.containingFunctionSymbol
...
^KT-55034 fixed
2022-11-22 18:25:30 +01:00
Ilya Kirillov
c8e3103af9
[FIR] do not create FirParameter for catch parameter
...
use FirProperty instead
^KT-55034
2022-11-22 18:25:30 +01:00
Ilya Kirillov
9671e20f1f
[FIR] do not create FirParameter during creation of for loop variable
...
^KT-55034
2022-11-22 18:25:30 +01:00
Dmitriy Novozhilov
eb8ce449e3
[FIR] Don't lose flexible types during capturing from expression
2022-11-22 15:46:22 +00:00
Dmitriy Novozhilov
06e88b559a
[FIR] Consider ConeConstraintSystemHasContradiction as a good reason for DELEGATE_SPECIAL_FUNCTION_NONE_APPLICABLE error
2022-11-22 15:46:21 +00:00
Dmitriy Novozhilov
9b7b517f43
[FIR] Properly resolve declarations inside contract calls on CONTRACT phase
2022-11-22 15:46:21 +00:00
Dmitriy Novozhilov
01c6c7dc59
[FIR] Properly approximate return type of callable declarations
...
- approximate intersection types in all non-local declarations
- approximate local types in non-private non-local declarations
2022-11-22 15:46:20 +00:00
Dmitriy Novozhilov
0f70635fcb
[FIR] Don't run FirFunctionReturnTypeMismatchChecker on only return statements of single expression bodies
...
This is needed not only as optimization, but also for cases, when
inferred type of function may differ from type of single expression.
Such situation may occur after next commit, which adds approximation
of return type of all declarations:
```
interface A
interface B
interface C : A, B
interface D : A, B
class Inv<T>(val x: T, val y: T)
fun foo(c: C, d: D) /* : Inv<Any> */ = Inv(c, d) /*: Inv<A & B> */
// Inv<A & B> /<: Inv<Any>
// but there should be no error
```
2022-11-22 15:46:20 +00:00
Dmitriy Novozhilov
991d8c18aa
[FIR] Fix incorrect inference of return type of anonymous functions
...
Also remove incorrect subtype check checkers
Test unsafeVarianceInAliasedFunctionalType.kt started to fail because
of KT-54894. This bug existed before, changes from this commit just
unhided it (previously it was hidden because incorrect subtype check
in `isSubtypeForTypeMismatch` which is used by FirFunctionReturnTypeMismatchChecker
2022-11-22 15:46:19 +00:00
Dmitriy Novozhilov
1b42298025
[FIR] Implement IMPLICIT_NOTHING_*_TYPE diagnostics
2022-11-22 15:46:19 +00:00
Dmitriy Novozhilov
0e84bf2053
[FIR] Don't report ARGUMENT_TYPE_MISMATCH on error types
2022-11-22 15:46:19 +00:00
Dmitriy Novozhilov
32f6b71525
[FE] Add ability to configure PublicDeclaration type approximation configuration
...
This configuration allows to choose what to do with local and anonymous types
2022-11-22 15:46:18 +00:00
Dmitriy Novozhilov
82c39187f6
[FIR] Refactor: rename function
2022-11-22 15:46:18 +00:00
Dmitriy Novozhilov
07567d6748
[FIR] Always fix type variables with UNKNOWN direction
2022-11-22 15:46:18 +00:00
Dmitriy Novozhilov
1b27d60307
[FIR] Support @OnlyInputTypes annotation
...
^KT-54807 Fixed
2022-11-22 15:46:17 +00:00
pyos
5cc08fb314
FIR DFA: check for reassignments of LHS when handling ?..
...
`x?.y != null` does not imply that `x != null` if e.g. an argument to
`y` has reassigned `x` in the meantime.
The same is true for `x == y` and `functionWithContract(x, y)`, but
those are somewhat harder to implement since there is no easy way to
find the last node of a certain argument.
^KT-55096
2022-11-22 15:44:38 +00:00
pyos
ae1048f8a9
FIR DFA: try to group mutations to persistent data structures
...
Thinking of monomorphizing `Flow` (= `PersistentFlow`) and instead
adding a completely separate `MutableFlow` version; then `joinFlow`
would produce a mutable one, data flow analysis would add some
statements, convert to a persistent `Flow` and proceed to the next
node.
2022-11-22 15:44:38 +00:00
pyos
ea1caf0955
FIR DFA: do not generate nodes (and flows) for contracts on calls
...
The code was already duplicated between FirDataFlowAnalyzer and
FirReturnsImpliesAnalyzer, so might as well use the latter to slightly
speed up the former.
2022-11-22 15:44:37 +00:00