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
Dmitry Petrov
decfaa3ba5
JVM_IR KT-44993 preserve inner expression type when fusing if-null
2021-03-16 15:30:45 +03:00
Dmitry Petrov
d74168fb8f
PSI2IR KT-44414 fix adapted reference to imported object member
2021-03-15 21:24:25 +03:00
Dmitriy Novozhilov
3d1f4b8386
[FIR] Don't add @EnhancedVisibility to types with @Nullable annotation
2021-03-15 12:13:06 +03:00
Roman Artemev
607a598f1a
[IR] Add irText test for generic annotations
2021-03-12 19:02:29 +03:00
Roman Artemev
ab8f64a3ee
[FIR] Mute failing tests
2021-03-12 18:47:34 +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
Alexander Udalov
bf844aa8e4
JVM IR: prevent behavior change with operator dot calls on literals
...
#KT-42321 Fixed
2021-03-10 18:46:30 +01:00
Alexander Udalov
e3dc112c5f
Add original KotlinType to rendered IrErrorType
...
Also improve an error message in `IrType.erasedUpperBound`, which seems
like a frequent first place where the JVM IR backend crashes in case an
error type has made it past psi2ir.
This will help in diagnosing problems such as KT-45016.
2021-03-09 21:07:53 +01:00
Dmitriy Novozhilov
da0fd7cc15
[FIR2IR] Approximate non-denotable types when converting ConeType to IrType
2021-03-02 19:11:21 +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
Anton Bannykh
b0e0e62c0b
Propagate isExternal flag in Psi2Ir and deserializer
2021-03-02 14:30:16 +03:00
Denis.Zharkov
4fffe7b9c8
FIR: Fix VerifyError caused by private delegates
...
^KT-45048 Fixed
2021-02-25 19:30:15 +03:00
Dmitriy Novozhilov
ea2783eace
[FIR] Fix generating this reference in delegated accessors
...
There was a problem with delegated extension property with dispatch
receiver that `this` in `getValue` call was set to dispatch receiver
instead of extension one
2021-02-20 18:27:43 +03:00
Denis.Zharkov
377a0aa237
FIR2IR: Adjust test data for updated overridden structure
2021-02-20 10:59:22 +03:00
Dmitriy Novozhilov
469252f6b4
[FIR] Don't create smartcast node if smartcasted type is equal to original type
2021-02-20 10:23:33 +03:00
Mikhail Glukhikh
357a7907a3
FIR: fix type approximation by visibility
2021-02-19 10:39:57 +03:00
Dmitry Petrov
744a0fcd25
PSI2IR KT-45022 object in LHS of compound assignment
2021-02-18 20:24:16 +03:00