Mikhail Glukhikh
983fa4c8c7
FIR: add temporary access to Enum.getDeclaringClass (see KT-49653)
2022-01-27 17:27:39 +03:00
Ivan Kochurkin
ed836f28f4
[FIR2IR] Function reference type approximation hack KT-49526
2022-01-21 19:34:11 +03:00
Ivan Kochurkin
4a200a2d7e
[FIR2IR] Fix NSEE in case of lambda in enum entry constructor call, ^KT-50774 Fixed
2022-01-21 19:34:09 +03:00
Mikhail Glukhikh
e8be9d4861
FIR: support don't use builder inference if possible
...
In this commit we upgrade FIR builder inference logic from
the compiler version to 1.7. FIR-based compiler now works with
"don't use builder inference" flag always ON and supports switching
the flag "use builder inference only if needed". To do it,
ContraintSystemCompleter (FIR) and KotlinConstraintSystemCompleter (FE 1.0)
are made similar with extracting some common parts into
ConstraintSystemCompletionContext.
Test status: one BB test fails after this commit (KT-49285).
Also we have a crush in DFA logic in FIR bootstrap test and somehow
questionable behavior in FIR diagnostic test. However,
two BB tests were fixed, the 3rd case from KT-49925 were also fixed.
#KT-49925 Fixed
2022-01-20 23:46:36 +03:00
Dmitriy Novozhilov
c80cfb0fdb
[FIR] Replace single supertype scope with list of scopes of supertypes in use site scopes
...
This big refactoring is needed to cleanup building of overrides
mappings and prevent creating redundant intersection overrides in
cases when there is no need in them:
```kotlin
interface A {
fun foo()
}
interface B {
fun foo()
}
interface C : A, B {
override fun foo()
}
```
Before this refactoring there was next override tree:
C.foo
intersection override (A.foo, B.foo)
A.foo
B.foo
Also this commit fixes special mapping of overrides in jvm scopes
for declarations which have kotlin builtins in supertypes with
special java mapping rules (collections, for example)
2022-01-19 15:24:43 +03:00
Evgeniy.Zhelenskiy
e97ca2ada4
[Psi2Ir, Fir2Ir] Generate toString, hashCode, equals methods for MF VC
2022-01-14 13:51:57 +00:00
Dmitry Petrov
976998b56c
PSI2IR KT-49526 function reference type approximation hack
2021-12-17 21:06:24 +00:00
Mikhail Glukhikh
40a2837b4c
FIR: Update test-data (Delegate inference)
2021-12-15 22:23:02 +03:00
Dmitry Petrov
34c70ea04e
JVM_IR KT-50193 result of !! is non-null
2021-12-14 17:10:20 +03:00
Ivan Kylchik
b131c52889
Drop all usages of WITH_RUNTIME directive
2021-12-13 18:07:11 +03:00
Mikhail Glukhikh
febf336d23
IrConstTransformer: transform constants also inside call children
2021-12-13 16:24:59 +03:00
Mikhail Glukhikh
e591f79533
FIR2IR: fix origins for anonymous functions & lambdas
2021-12-09 13:26:41 +03:00
Mikhail Glukhikh
a6d4f9c3b0
FIR: don't change explicitly given anonymous function type
2021-12-09 13:26:40 +03:00
Mikhail Glukhikh
e1ca5fe344
FIR2IR: apply suspend conversions also to varargs
2021-12-09 13:26:38 +03:00
Mikhail Glukhikh
9b42fab9de
FIR2IR: properly support combinations of SAM/suspend conversions
2021-12-09 13:26:36 +03:00
Mikhail Glukhikh
5b058cfcdc
FIR2IR: support RawType internal annotation
2021-12-09 13:26:32 +03:00
Dmitry Petrov
0ccd7a7e0c
KT-47939 fun interface constructor reference should throw NPE for null
2021-12-08 14:12:41 +03:00
Dmitry Petrov
e5eee9bab9
KT-47939 KotlinFunInterfaceConstructorReference is experimental
2021-12-08 14:12:40 +03:00
Dmitry Petrov
72f7276f3c
PSI2IR KT-47939 more tests
2021-12-08 14:12:40 +03:00
Dmitry Petrov
50b0dae786
KT-47939 fixes after review
2021-12-08 14:12:37 +03:00
Dmitry Petrov
58f1504aaf
KT-47939 basic fun interface constructor reference box test
2021-12-08 14:12:37 +03:00
Dmitry Petrov
11daed8b01
FIR2IR KT-47939 callable references to fun interface constructors
2021-12-08 14:12:36 +03:00
Dmitry Petrov
f55f880726
Minor: regenerate tests, update testData
2021-12-08 14:12:35 +03:00
Dmitry Petrov
27a144f86f
PSI2IR KT-47939 callable references to fun interface constructors
2021-12-08 14:12:34 +03:00
Mikhail Glukhikh
386e2e0950
FIR2IR: don't create separate delegate fields for constructor properties
2021-12-07 23:17:38 +03:00
Dmitriy Novozhilov
50f610cfd8
[Test] Add forgotten dumps for Fir2Ir text tests
2021-12-06 19:23:14 +03:00
Mikhail Glukhikh
fa8441fb23
FIR2IR: insert implicit not-null casts in delegated calls
2021-12-06 18:07:18 +03:00
Mikhail Glukhikh
7cfec0d846
FIR2IR: find & use delegate-to members properly
2021-12-06 18:07:18 +03:00
Mikhail Glukhikh
a919351d07
FIR2IR: change delegate field type to initializer type
2021-12-06 18:07:18 +03:00
Mikhail Glukhikh
85240bdb06
FIR2IR: generate type arguments in delegation calls
2021-12-06 18:07:17 +03:00
Dmitriy Novozhilov
df2e9e3797
[FE 1.0] Correctly set USED_AS_EXPRESSION for unreachable when and if blocks
...
^KT-50028 Fixed
2021-12-06 17:24:06 +03:00
Anastasiya Shadrina
4d3035e2f7
[Parser] Do not support local contextual declarations
2021-12-03 20:22:17 +03:00
Anastasiya Shadrina
2d088196ce
[FE] Fill DESCRIPTOR_TO_CONTEXT_RECEIVER_MAP only with CR enabled
2021-12-02 20:25:06 +03:00
Anastasiya Shadrina
a70036c945
[Tests] Add a test with type parameter as a context receiver
2021-12-02 20:24:58 +03:00
Anastasiya Shadrina
08570a37b8
[PSI2IR] Check how contextual functional type works with IR
2021-12-02 20:24:56 +03:00
Anastasiya Shadrina
4d0eb74d79
[Tests] Make sure desugaring works with context receivers
2021-12-02 20:24:52 +03:00
Anastasiya Shadrina
0bfea4fc52
[IR, Tests] Fix functionalType sample
2021-12-02 20:24:51 +03:00
Anastasiya Shadrina
17f24319d0
[IR, Tests] Add context receivers count to IR dump
2021-12-02 20:24:46 +03:00
Anastasiya Shadrina
2fbfee3e11
[PSI2IR] Fix parameter initialization for constructors with CR
2021-12-02 20:24:36 +03:00
Anastasiya Shadrina
f05ca5be33
[PSI2IR] Additional receiver -> context receiver
2021-12-02 20:24:26 +03:00
Anastasiya Shadrina
3f50b675b1
[Tests] Add irText tests
2021-12-02 20:24:25 +03:00
Alexander Udalov
be6409f0af
Fix property lookup in data class component generation
...
#KT-49812 Fixed
#KT-49936 Fixed
2021-12-02 01:43:39 +01:00
Alexander Udalov
2fbd2e2a15
Minor, move irText tests on data classes to a subdirectory
2021-12-02 01:43:39 +01:00
Denis.Zharkov
46217318c0
FIR: Load final static constant Java fields as non-nullable
2021-11-26 19:39:48 +03:00
Denis.Zharkov
883b18a0c6
FIR: Preserve non-custom attributes after substitution
...
The test is being fixed since synthetic call for elvis has @Exact-attribute on return type
2021-11-26 19:39:45 +03:00
Denis.Zharkov
c0b6a593e0
FIR: Fix incorrect type of block generated for inc operator
...
Previously, it was obtained from expected type of a variable being assigned,
but it's better to use the type of resulting expression
Initially this part was brought in 4ab0897d7d ,
but as we see in commit message and tests it was all about unit-coercion
2021-11-26 19:39:38 +03:00
Dmitriy Novozhilov
330574cab6
[FIR] Properly support smartcasts on stable when subjects in when conditions
...
^KT-49860 Fixed
2021-11-26 11:26:21 +03:00
Dmitry Petrov
88f41d006a
FIR2IR don't generate delegates for default interface members
2021-11-25 13:25:36 +03:00
Ivan Kochurkin
b83ed7a6ed
[FIR] Fix KtExpression.usedAsExpression for labeled expression
2021-11-24 23:13:37 +03:00
Dmitry Petrov
91b1814b02
FIR2IR insert implicit cast on elvis RHS
2021-11-24 16:19:11 +00:00