Dmitry Petrov
12d8b189a9
JVM_IR KT-50856 fix generic signature for SAM proxy function
2022-01-20 10:41:55 +00:00
Dmitriy Novozhilov
cd578e9d13
[FIR] Fix inference in presence of Unit expected type
2022-01-20 11:25:47 +03:00
Dmitriy Novozhilov
8624d97f29
[FIR] Extract adding of constraints from expected type to separate method
2022-01-20 11:25:47 +03:00
Dmitriy Novozhilov
def799cc4e
[FIR] Fix inference of postponed lambdas if containg call has explicit type arguments
2022-01-20 11:25:46 +03:00
Dmitriy Novozhilov
7d8a8d543f
[FIR] Fix processing calls on unstable smartcasts with check not null call
2022-01-20 11:25:45 +03:00
Dmitriy Novozhilov
1a3841d66d
[FIR] Properly enhance raw Class type in java annotations
2022-01-20 11:25:44 +03:00
Dmitriy Novozhilov
239a330ddd
[FE 1.0] Add test for KT-50850
2022-01-20 11:25:41 +03:00
Alexander Udalov
886545262b
IR: use mutable lists in IrStringConcatenation, IrTry, IrVararg
...
Make addArgument/addElement/putElement extension functions. This will
simplify transition to auto-generated IR.
Co-authored-by: mcpiroman <mcpiroman@gmail.com >
2022-01-19 17:50:35 +01:00
Dmitriy Novozhilov
345fdc214b
[FIR] Store enhanced functions and properties in session component
...
Previously enhanced symbols were cached inside SignatureEnhancement,
which is created independently for each enhancement scope. This may
cause creation of multiple enhanced symbols for same java declaration
in presence of multiple scope sessions (mutithread compiler, IDE,
separate scope session for checkers)
^KT-50858 Fixed
2022-01-19 15:24:43 +03:00
Dmitriy Novozhilov
6d8b1800e4
[FIR] Extract duplicated code of processing classifiers from intersection scope
2022-01-19 15:24:43 +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
Dmitriy Novozhilov
17916d4a63
[FE] Return Name? instead of List<Name> from getBuiltinFunctionNamesByJvmName
...
This is much more correct, because we have one to one mapping for
special java functions in this case, so using single nullable name
instead of list of names makes code more readable
2022-01-19 15:24:43 +03:00
Dmitriy Novozhilov
d588b2e654
[FIR] Add toString to all type scopes
2022-01-19 15:24:43 +03:00
Dmitriy Novozhilov
e4978d8022
[FIR] Move collecting classifiers from type intersection scope to context
2022-01-19 15:24:42 +03:00
Dmitriy Novozhilov
95a95450bf
[FIR] Extract logic of creating intersection overrides into separate class
2022-01-19 15:24:42 +03:00
Pavel Kirpichenkov
b4c854429f
[MPP] Permit const actual properties for non-const expects
...
It's safe as not having const is more restrictive, therefore can be
allowed in common. Otherwise, it's not possible to declare an expect
declaration for a platform property with `const` modifier in common
KT-18856
2022-01-19 13:22:47 +03:00
Denis.Zharkov
b2543b7a26
Fix false negative UPPER_BOUND_VIOLATED with typealiases in supertypes
...
^KT-50797 Fixed
^KT-50798 Open
2022-01-19 09:52:16 +03:00
Ilmir Usmanov
b794b0f1be
Check if there is bridge by signatures instead of IR
...
#KT-50649 Fixed
2022-01-18 16:57:00 +03:00
Dmitriy Novozhilov
5fc1e2e0cb
[FIR] Don't create DNN types for flexible simple types
...
^KT-50788
2022-01-18 13:41:31 +03:00
Victor Petukhov
72a78eb423
Replace errors with warnings for type checker recursion on delegates
...
^KT-49477 Fixed
2022-01-17 21:27:14 +03:00
Victor Petukhov
a4a2f71fca
Introduce deprecation cycle for reporting errors on some illegal equality calls inside a builder inference call
...
^KT-43493 Fixed
2022-01-17 19:44:16 +03:00
Dmitriy Novozhilov
8daf7774ba
[FIR] Properly handle when subject expression in DFA of equality calls
...
^KT-50785 Fixed
2022-01-17 17:59:23 +03:00
Dmitriy Novozhilov
57346bac54
[FIR] Properly handle flexible types during creation of DNNT
...
^KT-50788 Fixed
2022-01-17 17:59:22 +03:00
Mikhail Glukhikh
1274e2b90a
Deprecate ExtensionFunctionType on a non-function types
...
Related to KT-43527
2022-01-14 22:20:44 +03:00
Mikhail Glukhikh
d0fa3eb1d3
Forbid ExtensionFunctionType on functional types without parameters
...
#KT-43527 Fixed
2022-01-14 22:20:24 +03:00
Mikhail Glukhikh
beb2957726
FIR: render <T> name for DELEGATE_USES_EXTENSION_PROPERTY_TYPE_PARAMETER
...
Related to KT-50183
2022-01-14 22:20:23 +03:00
Mikhail Glukhikh
a4f74f60d9
Fix apostrophes in error messages #KT-50183 Fixed
2022-01-14 22:20:23 +03:00
Mikhail Glukhikh
230f210a2a
Fix error message for CONST_VAL_NOT_TOP_LEVEL_OR_OBJECT
...
#KT-50182 Fixed
2022-01-14 22:20:22 +03:00
Mikhail Glukhikh
37c0cad827
Minor code cleanup: resolveSupertypesByMembers
2022-01-14 22:20:21 +03:00
Mikhail Glukhikh
390fa682b9
Forbid calls of Any functions via super if they are overridden as abstract
...
#KT-38078 Fixed
2022-01-14 22:20:21 +03:00
Mikhail Glukhikh
b689bbf5c7
Forbid usages of super if in fact it accesses an abstract member
...
#KT-49017 Fixed
2022-01-14 22:20:21 +03:00
Xin Wang
60657022e0
JVM_IR: Generate counter loop for reversed array (KT-22429)
2022-01-14 21:48:07 +03:00
Evgeniy.Zhelenskiy
ec720ecfb5
[Ir, Fir2Ir] Remove unnecessary IsValue parameters of builder functions
2022-01-14 13:51:58 +00:00
Evgeniy.Zhelenskiy
e97ca2ada4
[Psi2Ir, Fir2Ir] Generate toString, hashCode, equals methods for MF VC
2022-01-14 13:51:57 +00:00
Evgeniy.Zhelenskiy
c7edc353d3
[FIX, Frontend] Fix recursive check for multi-field value classes
2022-01-14 13:51:57 +00:00
Evgeniy.Zhelenskiy
e69a973b07
[Frontend, Ir] Equality test passes
2022-01-14 13:51:57 +00:00
Evgeniy.Zhelenskiy
df1de3a7d3
[JVM] Forbid non-JvmInline value classes again
2022-01-14 13:51:56 +00:00
Evgeniy.Zhelenskiy
7595f798e1
[JVM] Introduce MF Value Classes to frontend
2022-01-14 13:51:55 +00:00
Dmitriy Novozhilov
bb6c6dc45d
[FE 1.0] Fix reporting of UNINITIALIZED_ENUM_ENTRY on qualified enums
...
^KT-41124
^KT-50758 Fixed
2022-01-14 14:26:54 +03:00
Dmitriy Novozhilov
9f870b0549
[FIR] Report errors on cycles in annotation parameter types
...
^KT-47932
2022-01-14 14:26:53 +03:00
Dmitriy Novozhilov
e9ac24dc33
[FE 1.0] Report errors on cycles in annotation parameter types
...
^KT-47932
^KT-50753 Fixed
2022-01-14 14:26:52 +03:00
Dmitriy Novozhilov
139a800ff7
[FE 1.0] Prohibit array literals inside nested objects of annotation classes
...
^KT-39041
^KT-50749 Fixed
2022-01-14 14:26:51 +03:00
Dmitriy Novozhilov
ff7eb79bb1
[FE 1.0] Prohibit call of constructor of functional supertype
...
^KT-46344
^KT-50730 Fixed
2022-01-14 14:26:50 +03:00
Dmitriy Novozhilov
ecc890efe8
[FE 1.0] Fix reporting of uninitialized parameter in default values of parameters
...
^KT-25694
^KT-50723 Fixed
2022-01-14 14:26:49 +03:00
Roman Golyshev
4418d76a0d
FIR: Replace fir.bounds with resolvedBounds where it is appropriate
...
If there is a `coneType` call immediately after the `fir.bounds` call,
it means that the fully resolved type is expected, hence
`resolvedBounds` should be used
2022-01-14 01:04:24 +03:00
Roman Golyshev
939e4d1e77
FIR: Fix "unreachable branch in when" warning
2022-01-14 00:12:51 +03:00
Dmitry Petrov
d184babda6
JVM_IR fix cast to non-null primitive type (FIR bootstrap issue)
2022-01-13 12:47:00 +00:00
Denis.Zharkov
964cf937c3
Fix IllegalStateException in case of recursive T & Any upper bound
...
^KT-50542 Fixed
2022-01-13 12:54:47 +03:00
Dmitriy Novozhilov
b2b5f4a63a
[FE 1.0] Don't report deprecation diagnostics about enum on it's own entries
...
^KT-37975 Fixed
2022-01-12 19:11:28 +03:00
Andrey Uskov
2adc851f1b
Don't use global state for keeping incremental compilation state
...
Previously IC state was stored in System properties. As result parallel
compilation might cause incorrect state of IC, what led to corruption
of kotlin_module files. Now IC state is stored via CompilerArguments
and CompilerConfiguration
#KT-46038 Fixed
2022-01-12 13:37:46 +03:00