Victor Petukhov
eb19d39cbf
[FE 1.0] Build captured type's supertypes in an alternative way: use own projection type as a first supertype, then supertypes from the corresponding type parameter's upper bounds
...
The original case provoked forking a constraint system which isn't supported in K1 (K2 only). If the captured type is recursive, then type parameter's upper bounds may break subtyping due to substitution the current captured type again, into a recursive type parameter.
Note that we already have special logic for recursive captured types. See `isTypeVariableAgainstStarProjectionForSelfType`.
^KT-52782 Fixed
2022-06-18 14:04:40 +02:00
Ivan Kochurkin
b573532d8c
Introduce COMPONENT_FUNCTION_NAME_PREFIX constant
2022-06-17 23:26:15 +00:00
Alexander Udalov
08f18c2940
Fix metadata deserialization for context receivers with type table
...
In DeserializedClassDescriptor and MemberDeserializer, only the
`contextReceiverTypeList` field was used, and not
`contextReceiverTypeIdList` which is used when `-Xuse-type-table` is
enabled. The convention is to use a bunch of utilities declared in
`protoTypeTableUtil.kt` which deal with both methods of reading types.
Also, simplify the deserialization code in FIR (which was correct for
some reason).
2022-06-15 16:45:30 +02:00
mcpiroman
529c03ab08
Switch to auto generated IR tree
...
Co-authored-by: Alexander Udalov <alexander.udalov@jetbrains.com >
2022-06-13 18:58:05 +02:00
Dmitriy Novozhilov
83d0a3e7a3
[FIR] Extract FirPluginKey into :core:compiler.common and rename it to GeneratedDeclarationKey
...
This is needed to avoid dependency on :compiler:fir:fir2ir module in
backend parts of compiler plugins. It will allow to publish those
parts into jars for IDE, where they are needed for working of debugger
and bytecode toolwindow
2022-06-07 14:12:25 +00:00
Dmitriy Novozhilov
26df9d74e8
[FE] Add flag to java model to distinguish source java classes from binaries
2022-06-07 14:12:23 +00:00
Mikhail Glukhikh
6fc27c22f4
K1:report warning on OptIn usages inside SAM constructor #KT-47708 Fixed
2022-06-02 15:36:58 +00:00
Mikhail Glukhikh
8fefa8a57b
Restore Experimentality data class for IDE compatibility
2022-06-02 15:36:58 +00:00
Mikhail Glukhikh
8baff4404d
Partial rename of 'Experimentality' around K1 checkers
2022-06-02 15:36:56 +00:00
Mikhail Glukhikh
eaa77b5af6
[FIR JS] Generate dynamic FIRs via DynamicScope
2022-06-02 13:47:26 +00:00
Pavel Mikhailovskii
3b5179686e
KT-52592 Fix NPE from KProperty.getExtensionDelegate on property delegated to another property; make $delegate methods private
2022-06-01 14:02:28 +00:00
Roman Golyshev
e72f8f829a
[FIR] More special names unification
2022-06-01 11:56:39 +00:00
Roman Golyshev
01ce499bb2
[FIR] Unify some special names to make code more uniform
2022-06-01 00:11:17 +04:00
Victor Petukhov
96d1f89836
[BE] Support until operator in back-ends
2022-05-31 08:42:56 +00:00
Victor Petukhov
0b25ce4de9
[FE] Support resolve of until operator to rangeUntil
...
^KT-52420 Fixed
2022-05-31 08:42:55 +00:00
Ivan Kochurkin
e69250a9fe
[FIR] Microoptimizations and clearing
2022-05-29 23:41:24 +03:00
Victor Petukhov
867ad24c86
[FE] Show causing types in the INFERRED_TYPE_VARIABLE_INTO_EMPTY_INTERSECTION diagnostic
2022-05-27 15:14:24 +00:00
Victor Petukhov
6a34b184ac
[FE] Introduce warnings on possible empty intersection types, and improve errors reporting in general
...
^KT-52361 Fixed
2022-05-27 15:14:23 +00:00
Victor Petukhov
9a3b5e547b
[FE] Add fast-paths for some types which are checked for intersection emptiness
2022-05-27 15:14:22 +00:00
Victor Petukhov
0199c76c06
[FE 1.0] Check callable reference return type safety during resolution
...
^KT-51844
^KT-52503 Fixed
2022-05-27 13:56:34 +00:00
Victor Petukhov
51551998c7
Revert "[FE 1.0] Take care callable reference candidates with recursive candidate return type"
...
This reverts commit d04beaa8bb49c99ceb993f3f7b32169c393b39f4.
2022-05-27 13:56:33 +00:00
Jinseong Jeon
58c2433bdd
FIR LC: use unified annotations' ClassId (missed JvmName)
2022-05-24 20:32:55 +02:00
Yahor Berdnikau
af6f17c243
Unify kotlinCompilerClasspath for all projects
...
This will prevent spawning second Kotlin daemon during compilation
except 'buildSrc' compilation. Original change was introduced in
2e515f3945 commit.
2022-05-24 07:58:38 +00:00
Victor Petukhov
fbb2e18bea
[FE 1.0] Use 1.7.20 as default language version for java type enhancement
...
^KT-50478
2022-05-23 12:36:31 +02:00
Victor Petukhov
88d35067e3
[FE 1.0] Keep the same type attributes during union or intersection type attributes
...
^KT-51317 Fixed
2022-05-23 12:36:12 +02:00
Dmitriy Novozhilov
d66748d011
[FIR] Extract expect actual matching into separate phase
2022-05-20 13:33:04 +00:00
Dmitriy Novozhilov
de842817e8
[FE] Move ExpectActualCompatibility to :core:compiler.common module
2022-05-20 13:33:03 +00:00
Denis.Zharkov
c018270462
Support DNN types in approximator
...
Mostly, it's relevant to FIR since there we started loading
type parameter based types as (T & Any..T?)
2022-05-19 16:54:06 +00:00
Denis.Zharkov
f70ae2df3a
FIR: Refine inference constraints when type variable in flexible position
...
That issue might be fixed via changing
TypeVariableMarker.shouldBeFlexible at ConeConstraintSystemUtilContext
but this and some other tricks have been added because of incorrect
handling of constraints where type variable has a flexible bound
^KT-51168 Fixed
2022-05-19 16:53:59 +00:00
Dmitriy Novozhilov
993021a71d
[Build] Use 1.8 target version instead of 1.6 while using JPS build
2022-05-19 07:14:21 +00:00
Ivan Kylchik
f3252334b2
Move most of ir utils from backend.common to ir.tree
2022-05-18 21:20:03 +03:00
Ivan Kylchik
761424b131
Add IntrinsicConstEvaluation annotation to some ir builtins functions
2022-05-18 21:19:55 +03:00
Ivan Kylchik
1564f2c549
Mark all declarations that will be evaluated with ir interpreter
2022-05-18 21:19:54 +03:00
Ilya Gorbunov
eb8e701cb5
Make IntrinsicConstEvaluation annotation internal
2022-05-17 14:38:43 +00:00
Victor Petukhov
6c994787b3
[FE 1.0] Don't expand type enhancement
...
Actually shallow type enhancement is primary, it's more specific
^KT-50734 Fixed
2022-05-17 07:38:26 +00:00
Victor Petukhov
11eb5ce39c
[FE] Check types in canHaveCommonSubtype for intersection emptiness with erasing nullability
...
It doesn't affect having common subtypes check but may lead to false positives
^KT-52364 Fixed
2022-05-12 15:11:27 +00:00
Victor Petukhov
ba158de848
[FE] Use errorTypesEqualToAnything and stubTypesEqualToAnything for type checker context which is used for type intersection emptiness check
2022-05-12 15:11:27 +00:00
Victor Petukhov
9f31f074da
[FE 1.0] Take care callable reference candidates with recursive candidate return type
...
^KT-51844 Fixed
2022-05-09 19:23:43 +00:00
Victor Petukhov
ec6ec20728
[FE 1.0] Fix subtyping for captured integer literal types
...
^KT-50877 Fixed
2022-05-09 19:23:42 +00:00
Victor Petukhov
6c54b78574
[FE 1.0] Don't capture projections during compatibility check of supertypes to determine intersection type emptiness
2022-04-27 19:50:30 +00:00
Victor Petukhov
73be9d0a20
[FE] Don't check intersection emptiness if there were lower constraints
2022-04-27 19:50:30 +00:00
Victor Petukhov
20a8e5d742
[FE] Determine intersection type emptiness by looking at supertypes properly: substitute their type arguments
2022-04-27 19:50:29 +00:00
Victor Petukhov
54f0794ce3
[FE] Substitute erased type parameters as covariant
2022-04-27 19:50:28 +00:00
Victor Petukhov
4293b546ba
[FE] Provide org.jetbrains.kotlin.load.java.components.TypeUsage as an alias of org.jetbrains.kotlin.types.TypeUsage for IDEA
2022-04-27 19:50:27 +00:00
Victor Petukhov
fb76d819f0
[FE] Erase type parameters of super types during intersection type emptiness check as well
2022-04-27 19:50:27 +00:00
Victor Petukhov
39d13442be
[FE] Support intersection type emptiness checking for interfaces
2022-04-27 19:50:25 +00:00
Victor Petukhov
e0a1f1c405
[FE] Review fixes
2022-04-27 19:50:24 +00:00
Victor Petukhov
47d6236a2d
[FIR] Support determining emptiness of an intersection type with type parameters' types
2022-04-27 19:50:23 +00:00
Victor Petukhov
f31cf90de2
[FE 1.0] Unbind type parameter erasing from java
2022-04-27 19:50:22 +00:00
Victor Petukhov
5bfe6cd20a
[FE] Implement discussed rules to report empty intersection errors
2022-04-27 19:50:22 +00:00