Pavel Mikhailovskii
4676072137
KT-51284 Fix SAM conversion for methods with context receivers
2022-12-07 09:01:21 +00:00
Pavel Mikhailovskii
2d69fd5a8a
KT-52027 Encapsulate and fix calculation of parameter indices
2022-12-06 23:16:11 +00:00
Pavel Mikhailovskii
25ad7fe31c
KT-51863 Account for context receivers in calls with changed parameter order
2022-12-06 16:28:08 +00:00
Mikhail Glukhikh
5cf1a88c42
FE: move delegate name functions to NameUtils
2022-12-02 21:54:18 +00:00
Vladislav Grechko
cb93e9d408
Get rid of redundant boxing of unsigned operands of infix 'compareTo'
...
^KT-48759: Fixed
2022-12-02 18:25:52 +00:00
Dmitriy Novozhilov
1281b778fb
[Test] Fix broken testdata
2022-12-01 14:47:24 +02:00
Alexander Udalov
3ab2b82878
JVM IR: script is a valid container for local delegated properties
...
When serializing metadata for local delegated properties, we need to
find a valid container class where to put it, and where kotlin-reflect
will be able to find that metadata at runtime. Taking just the closest
class lexically doesn't work, because in the attached test, it is a
class for a lambda which does not have metadata and thus does not have a
way to store any extra information.
So, in 1663619606 we started to look for the closest "non-synthetic"
class to store this metadata. But apparently it was missed that script
is a valid container class. In the test, this meant that no
non-synthetic container classes were found to store the metadata, so we
falled back to using the closest class anyway (see `?: this` in
`rememberLocalProperty`), which turned out to be the lambda.
After this change, metadata for local delegated property in a lambda
will be stored in the script class, just like it's stored in the file
class in the non-script case.
#KT-55065 Fixed
2022-12-01 12:55:01 +01:00
Dmitriy Novozhilov
6b343515e1
[Test] Save IR bytecode dumps from BytecodeListingHandler to .ir.txt file instead of _ir.txt
...
This is needed to keep consistency with other dumps and to allow
test helper plugin to recognize those dumps
2022-12-01 07:29:37 +00:00
Pavel Mikhailovskii
f96d41e414
KT-4107 Don't generate readResolve for data objects
2022-11-30 21:07:20 +00:00
Evgeniy.Zhelenskiy
fa4a4e56f3
[Tests] Remove unnecessary usages of OPTIONAL_JVM_INLINE_ANNOTATION
...
Signed-off-by: Evgeniy.Zhelenskiy <Evgeniy.Zhelenskiy@jetbrains.com >
#KT-1179
2022-11-30 18:55:42 +00:00
Evgeniy.Zhelenskiy
50310d42e3
[IR] MFVC lateinit variables and properties test
...
Signed-off-by: Evgeniy.Zhelenskiy <Evgeniy.Zhelenskiy@jetbrains.com >
#KT-1179
2022-11-30 18:55:42 +00:00
Evgeniy.Zhelenskiy
b7f249cdb6
[IR] Fix bugs in MFVC function references support
...
Signed-off-by: Evgeniy.Zhelenskiy <Evgeniy.Zhelenskiy@jetbrains.com >
#KT-1179
2022-11-30 18:55:41 +00:00
Evgeniy.Zhelenskiy
68fb8aa2a1
[IR] Replace indexes with names for mfvc methods and fields
...
Signed-off-by: Evgeniy.Zhelenskiy <Evgeniy.Zhelenskiy@jetbrains.com >
#KT-1179
2022-11-30 18:55:41 +00:00
Evgeniy.Zhelenskiy
b692748938
[IR] Always add getter methods to value classes even if not used
...
Signed-off-by: Evgeniy.Zhelenskiy <Evgeniy.Zhelenskiy@jetbrains.com >
#KT-1179
2022-11-30 18:55:40 +00:00
Evgeniy.Zhelenskiy
3653c86f08
[IR] Rename static replacement of MFVC typed equals to "equals-impl0"
...
Signed-off-by: Evgeniy.Zhelenskiy <Evgeniy.Zhelenskiy@jetbrains.com >
#KT-1179
2022-11-30 18:55:40 +00:00
Evgeniy.Zhelenskiy
38c80192f9
[IR] Support MFVC-typed properties and interfaces delegates
...
Signed-off-by: Evgeniy.Zhelenskiy <Evgeniy.Zhelenskiy@jetbrains.com >
#KT-1179
2022-11-30 18:55:40 +00:00
Evgeniy.Zhelenskiy
4d426fc4cd
[IR] Generate not FIR_IDENTICAL box fir value classes tests
...
Signed-off-by: Evgeniy.Zhelenskiy <Evgeniy.Zhelenskiy@jetbrains.com >
#KT-1179
2022-11-30 18:55:39 +00:00
Evgeniy.Zhelenskiy
adee33d3e5
[IR] Forbid MFVC primary constructors default arguments
...
Signed-off-by: Evgeniy.Zhelenskiy <Evgeniy.Zhelenskiy@jetbrains.com >
#KT-1179
2022-11-30 18:55:38 +00:00
Evgeniy.Zhelenskiy
c6e54e6433
[IR] Support object-like interaction with MFVC function references
...
Signed-off-by: Evgeniy.Zhelenskiy <Evgeniy.Zhelenskiy@jetbrains.com >
#KT-1179
2022-11-30 18:55:37 +00:00
Evgeniy.Zhelenskiy
f2d98eac5e
[IR] Make use a temp variable for flattened non-local non-MFVC getters
...
Signed-off-by: Evgeniy.Zhelenskiy <Evgeniy.Zhelenskiy@jetbrains.com >
#KT-1179
2022-11-30 18:55:37 +00:00
Evgeniy.Zhelenskiy
9f01ccc304
[IR] Support user-defined equals for MFVC
...
Signed-off-by: Evgeniy.Zhelenskiy <Evgeniy.Zhelenskiy@jetbrains.com >
#KT-1179
2022-11-30 18:55:36 +00:00
Evgeniy.Zhelenskiy
51f9f31a0a
[IR] Remove suffix from MFVC specialized equals function
...
Signed-off-by: Evgeniy.Zhelenskiy <Evgeniy.Zhelenskiy@jetbrains.com >
#KT-1179
2022-11-30 18:55:36 +00:00
Evgeniy.Zhelenskiy
6107caa8e2
[FE1.0, FIR] Support secondary constructors for Value Classes
...
Signed-off-by: Evgeniy.Zhelenskiy <Evgeniy.Zhelenskiy@jetbrains.com >
#KT-1179
2022-11-30 18:55:35 +00:00
Evgeniy.Zhelenskiy
8c3fa6f09f
[IR] Escape removing extra boxes if no box was are in the function
...
Signed-off-by: Evgeniy.Zhelenskiy <Evgeniy.Zhelenskiy@jetbrains.com >
#KT-1179
2022-11-30 18:55:35 +00:00
Evgeniy.Zhelenskiy
89d5592622
[IR] Support function references
...
Signed-off-by: Evgeniy.Zhelenskiy <Evgeniy.Zhelenskiy@jetbrains.com >
#KT-1179
2022-11-30 18:55:34 +00:00
Evgeniy.Zhelenskiy
51e76aa19a
[IR] Support default arguments
...
Signed-off-by: Evgeniy.Zhelenskiy <Evgeniy.Zhelenskiy@jetbrains.com >
#KT-1179
2022-11-30 18:55:33 +00:00
Mikhail Glukhikh
c698d060c6
FIR2IR: support static fake overrides for fields (related to KT-53441)
...
#KT-54921 Fixed
2022-11-28 17:27:50 +00:00
Sergej Jaskiewicz
aa1b18b0c8
[IR] Prevent infinite recursion when rendering bound symbol references
...
Refactor the renderer, make BoundSymbolReferenceRenderer a static class
to prevent calling RenderIrElementVisitor's methods from it to avoid
infinite recursion in the future.
^KT-52677 Fixed
2022-11-28 16:43:53 +00:00
vladislav.grechko
50e92d2238
Add null checks in constructors taking value class types
...
^KT-53492: Fixed
2022-11-24 20:12:05 +00:00
Vladislav Grechko
cd6e865fb3
Improve support of 'lateinit' modifier
...
- Allow 'lateinit' for inline classes which underlying type
is suitable for 'lateinit'
- K2: report all problems related to 'lateinit' modifier
^KT-55052: Fixed
2022-11-24 19:47:21 +00:00
vladislav.grechko
e0c13e5276
Fix addAll & putAll invocations on inline mutable collections
...
^KT-54950: Fixed
2022-11-24 19:27:42 +00:00
Ivan Kylchik
a1477983ba
Properly handle vararg interpretation for classic frontend
...
#KT-55108 Fixed
2022-11-24 11:07:07 +00:00
Denis.Zharkov
f7d8fd54ca
K2: Fix deserialization of flexible type based on type parameter
...
It's anyway safe to use avoidComprehensiveCheck = true because
during deserialization we're sure that we need DNN type because
it's been serialized as such.
2022-11-24 09:39:58 +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
Dmitriy Novozhilov
1b27d60307
[FIR] Support @OnlyInputTypes annotation
...
^KT-54807 Fixed
2022-11-22 15:46:17 +00:00
pyos
67a6785f63
FIR DFA: move eq/notEq null-to-type translation to LogicSystem
...
This makes the `returns() implies` checker slightly cleaner, and also
fixes the case that I've missed where in RHS of `x ?:` type of `x` was
not set to `Nothing?`.
2022-11-22 15:44:37 +00:00
vladislav.grechko
5ec2f1ad92
Get rid of redundant boxing when comparing inline class instances
...
^KT-33722: Fixed
2022-11-18 23:14:03 +00:00
vladislav.grechko
36b8ba8df3
Improve support of custom equals in inline classes
...
- Ensure that typed equals parameter's type is a star projection of
corresponding inline class
- Make possible to declare typed equals that returns 'Nothing'
- Forbid type parameters in typed equals operator declaration
^KT-54909 fixed
^KT-54910 fixed
2022-11-17 15:35:14 +01:00
Pavel Mikhailovskii
4436ce22b0
Generate meaningful bytecode names for extension receivers in INDY lambdas
2022-11-15 15:38:34 +00:00
Svyatoslav Kuzmich
4ba780be26
[Wasm] unmute test
2022-11-14 13:55:39 +01:00
Svyatoslav Kuzmich
78bd6dbdcd
[Wasm] Allow implementing function interfaces
2022-11-14 11:23:18 +01:00
Mikhael Bogdanov
edc54524aa
Xjdk-release: support mixed compilation of Java and Kotlin
...
#KT-52815 Fixed
2022-11-14 06:57:12 +00:00
Ilya Chernikov
7e4ee399c8
FIR JS: temporarily mute remaining codegen tests
2022-11-12 16:28:25 +01:00
Ilya Chernikov
78ca733c38
FIR JS: add K2 variants of all other JS tests
...
except tests that are not possible to add without some modifications in
the test infra. See todos on the commented-out test declarations
2022-11-12 16:28:24 +01:00
Ilya Chernikov
4e4511bba2
FIR2IR: convert enums with non-primary default ctor correctly
...
see added test for example
2022-11-12 16:28:24 +01:00
Ilya Chernikov
44cce3ad52
FIR JS: mute remaining tests for now
2022-11-12 16:28:23 +01:00
Ilya Chernikov
5b3816cce5
Test infra: refactor IGNORE_BACKEND directive
...
treat it as a general one, introduce *_K1 and *_K2 variants for
more specific ignoring
2022-11-12 16:28:23 +01:00
Mikhail Glukhikh
3a81174a4c
FIR2IR: support static fake overrides (functions) #KT-53441 Fixed
2022-11-11 13:30:36 +00:00
pyos
e2a83a0ed0
FIR: unwrap intersection overrides when looking for owner class
...
But not substitution overrides! This is important if the method called
is an intersection override where one of the intersected types is a
subtype of a generic type.
2022-11-11 13:30:32 +00:00