Roman Artemev
14c91ca0de
[TEST] Set proper TARGET_BACKEND for jvm-specific irText tests
2021-06-16 21:16:43 +03:00
Georgy Bronnikov
f0f01db66e
Temporarily mute a failing test
2021-06-16 01:48:28 +03:00
Dmitry Petrov
bf077b893c
PSI2IR KT-47245 handle declaration statements in control structures
2021-06-11 16:42:31 +03:00
Mikhail Glukhikh
491267b4f7
FIR2IR: convert annotations on local variables
2021-06-09 15:42:38 +03:00
Mikhail Glukhikh
77dd0ad396
FIR: handle custom attributes more precise
2021-06-09 15:42:37 +03:00
Mikhail Glukhikh
4f70f47fa6
FIR2IR: convert annotations on type parameters #KT-46967 Fixed
2021-06-09 15:42:36 +03:00
Ivan Kylchik
cc169613c1
Drop result of finally block after interpretation
...
This change is needed due to using FIR as frontend for tests. In this
case finally block doesn't has coercion to unit so it's result must
be dropped manually.
2021-06-07 15:35:20 +03:00
Ivan Kylchik
5596e1e1e1
Properly support char and boolean arrays in interpreter
...
For now boolean array will expect proper Boolean instead of any value.
This change just unify logic of working with primitive arrays.
2021-06-07 15:35:18 +03:00
Ivan Kylchik
25989b36c5
Allow to create object in interpreter only if it is compile time
2021-06-07 15:35:16 +03:00
Ivan Kylchik
e28ab45c51
Add ir interpreter tests
2021-06-07 15:35:12 +03:00
Denis.Zharkov
592256976e
FIR: Fix inference of builder-inference function from expect type
...
Previously, such calls were being completed with FULL mode and incorrect
INFERENCE_NO_INFORMATION_FOR_PARAMETER has been reported
2021-06-07 15:25:57 +03:00
Denis.Zharkov
18e93b50d9
FIR: Fix loading read-only collection Java types with incorrect variance
2021-06-07 15:25:56 +03:00
Denis.Zharkov
5ade831665
FIR: Fix INFERENCE_NO_INFORMATION_FOR_PARAMETER on type alias with generic expansion
...
^KT-46996 Fixed
2021-06-07 15:25:55 +03:00
Denis.Zharkov
d76db0e011
FIR: Mute backend tests relevant to new INFERENCE_NO_INFORMATION_FOR_PARAMETER
...
See KT-46967 and KT-46996
2021-06-07 15:25:53 +03:00
Denis.Zharkov
0aca3a3737
FIR: Adjust test data after introduction of INFERENCE_NO_INFORMATION_FOR_PARAMETER
...
See previous commits for details
2021-06-07 15:25:47 +03:00
Victor Petukhov
2d3ed4b7da
Update FIR test data
2021-06-04 13:25:10 +03:00
Victor Petukhov
124a14c8df
Use separate constraint position during call substitution as part of inferring postponed type variables
...
^KT-47052 Fixed
^KT-47082 Fixed
2021-06-03 12:37:17 +03:00
Denis.Zharkov
f0c85e0935
FIR: Add comments to freshly muted tests
2021-05-21 13:53:55 +03:00
Denis.Zharkov
d3fc22fc6a
FIR: Mute suspicious test relevant to safe-call and increment
...
See KT-46658
2021-05-20 17:24:43 +03:00
Denis.Zharkov
cd401b5b8a
FIR: Update integer literal-related tests
...
They started failing once we began reporting diagnostics from completion
^KT-46419 Relates
2021-05-20 17:24:14 +03:00
Mikhail Glukhikh
a255f44d6e
FIR2IR KT-46578 add overridden properties generation
2021-05-14 16:20:20 +03:00
Dmitry Petrov
53c1de172f
IR KT-46578 add IrProperty#overriddenSymbols
2021-05-14 16:20:18 +03:00
pyos
d5d6736e67
PSI2IR/FIR2IR: do not approximate T!! before translation
...
This leads to weird effects when it's in a contravariant position,
because it's approximated by Nothing.
2021-05-12 11:37:48 +03:00
Tianyu Geng
d4717569b9
Fix inferred type of FirGetClassCall
...
The inferred type should be `KClass<out Blah>` for `FirGetClassCall`
invoked on expressions.
2021-05-06 17:50:33 +03:00
Dmitry Petrov
660208740e
PSI2IR KT-44013 WA: function interface constructor call accepted by FE
2021-04-27 17:35:37 +03:00
Mark Punzalan
9a4742c08d
FIR: Properly build nullable suspend function types, and aggregate
...
modifiers and annotations within KtTypeReference/REFERENCE_TYPE nodes.
2021-04-26 15:11:38 +03:00
Mikhail Glukhikh
29d2a6acee
FIR: fold String arguments inside string concatenation call
...
Related to KT-28006
2021-04-26 12:50:57 +03:00
Mikhail Glukhikh
f278de8768
FIR: don't call toString() inside string concatenations
2021-04-26 12:50:55 +03:00
Steven Schäfer
8c9ad81c76
Psi2Ir: Fold constants when generating IR
...
This is necessary to avoid stack overflow errors on large constant
expressions.
2021-04-21 19:10:31 +03:00
Dmitry Petrov
732405895f
Add tests for KT-45308
2021-04-21 17:36:12 +03:00
Dmitry Petrov
f228c3bb04
Add tests for KT-45236
2021-04-21 17:24:41 +03:00
Andrey Zinovyev
5fc1514104
[FIR][LightTree] Better expression identification
...
And some refactoring
Regenerate IDE parts
2021-04-20 18:13:06 +03:00
Andrey Zinovyev
27766c2575
[FIR] Consistent isLocal for objects inside Enum entries
2021-04-20 18:12:51 +03:00
Dmitry Petrov
e89ab71bf8
JVM_IR KT-45934 don't generate declaration stubs for delegates
2021-04-15 17:59:19 +03:00
Dmitry Petrov
f1eeb72c01
PSI2IR KT-46069 resolve IR-based type parameter descriptors to symbols
2021-04-14 21:27:01 +03:00
Mark Punzalan
21a3a14289
FIR: Use intersection of all upper bounds for parameterized types in
...
ConeKotlinType.canBeNull.
^KT-45903 In progress
2021-04-14 19:17:10 +03:00
Dmitry Petrov
7d62f0b5aa
JVM_IR KT-45187 use Arrays.copyOf to copy an array in spread operator
...
Creating a new array (and copying data into it with System.arraycopy)
doesn't work in generic case, because the actual array class depends on
call site.
2021-04-13 22:27:37 +03:00
Dmitry Petrov
7e03f8ea80
JVM_IR KT-45853 include return type into Java method IdSignature
...
This is a hack required to accept [potentially] incorrect input
provided by the front-end; see KT-46042.
2021-04-12 22:52:08 +03:00
Mikhail Glukhikh
9f27362ee1
Match triangle & diamond intersections in FirTypeIntersectionScope
2021-04-02 10:24:20 +03:00
Jinseong Jeon
b4a5eec5f4
Raw FIR: correct loop target for break/continue in do-while loop condition
...
As shown in KT-44412 (or KT-45319 or KT-17728):
```
fun test5() {
var i = 0
Outer@while (true) {
++i
var j = 0
Inner@do {
++j
} while (if (j >= 3) false else break) // break@Inner
if (i == 3) break
}
}
```
To properly set the loop target for `break` in do-while loop condition,
the loop target for that do-while loop should be ready before parsing
the loop condition.
Previously, Raw FIR loop building configures loop target after visiting
loop conditions. This commit splits the configuration and lets the
builders prepare the loop target for do-while loop only.
2021-04-01 20:07:50 +03:00
Jinseong Jeon
81999117dc
FIR2IR: force return type of loop body block as Unit
2021-04-01 20:07:49 +03:00
Jinseong Jeon
7898d167f3
FIR2IR: wrap do-while loop in IrBlock
...
"so that variables declared in loop body are not visible outside of the
loop" (from commit d096f1d )
2021-04-01 20:07:47 +03: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
Dmitriy Novozhilov
d0a148074f
[FIR2IR] Fix generating body for for-loop
2021-03-30 12:28:15 +03:00
Ilya Chernikov
3400911d97
[minor] unmute fixed FIR tests
2021-03-24 21:24:20 +01:00
Dmitriy Novozhilov
f4afc2ef44
[FIR] Map dispatch receiver type of function in JvmMappedScope
2021-03-24 12:56:16 +03:00
Dmitriy Novozhilov
7dc3be3b9b
[FIR2IR] Replace star projections with upper bounds for SAM conversion types
2021-03-24 12:56:15 +03:00
Roman Artemev
0a4f2bc39c
[IR] Add irText test for KT-45297
2021-03-18 16:50:22 +03:00
Mikhail Glukhikh
ebfc431733
FIR body resolve context: fix accessor scope handling
2021-03-17 12:13:23 +03:00
Steven Schäfer
99a4779c6b
JVM IR: Don't produce line numbers in synthetic Enum members
2021-03-16 21:30:18 +01:00