Commit Graph

193 Commits

Author SHA1 Message Date
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 ec6ec20728 [FE 1.0] Fix subtyping for captured integer literal types
^KT-50877 Fixed
2022-05-09 19:23:42 +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 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 5bfe6cd20a [FE] Implement discussed rules to report empty intersection errors 2022-04-27 19:50:22 +00:00
Victor Petukhov b96708c3e2 [FE] Support reporting INFERRED_TYPE_VARIABLE_INTO_EMPTY_INTERSECTION for empty intersection types with type parameters 2022-04-27 19:50:21 +00:00
Victor Petukhov 9e9e0211eb [FE] Check if type variable is fixed into an empty intersection type and report resolution warnings/errors if needed (completion stage)
^KT-51221 Fixed
2022-04-27 19:50:18 +00:00
Alexander Udalov 2e515f3945 Prohibit JVM target 1.6
But still compile stdlib, reflect, kotlin.test and scripting runtimes
with JVM target 1.6 to simplify migration from Kotlin 1.6 to 1.7.

 #KT-45165 Fixed
2022-04-19 22:54:40 +02:00
Aleksei.Cherepanov 3d8f140d6b [JPS] Fix incremental build after changing Java enum used in Kotlin when
EnumWhenTracker implemented for tracking changed java enum class items, that used in kotlin when expression.

#KT-47824 Fixed
2022-04-19 18:39:41 +00:00
Denis.Zharkov 550d24f8c6 FIR: Introduce ContextFunctionTypeParams type attribute 2022-04-06 16:05:26 +00:00
Mikhail Glukhikh 9bd6a9c069 FIR: handle 'SinceKotlin' as a special kind of deprecated
#KT-51850 Fixed
2022-04-06 12:51:20 +00:00
Evgeniy.Zhelenskiy b6f2513dd2 [FIR] Introduce valueClassRepresentation to FIR
#KT-1179
2022-03-24 11:38:44 +00:00
Evgeniy.Zhelenskiy 28bf83ceac [IR] Unite inline class and multi-field value class representation
#KT-1179
2022-03-24 11:38:43 +00:00
Evgeniy.Zhelenskiy 282ab398c6 [IR] Generify lowerings
#KT-1179
2022-03-24 11:38:42 +00:00
Victor Petukhov b5933c70e2 [FE 1.0] Refactor error utils: split error entities and introduce error type and error scope kinds 2022-03-23 21:13:33 +00:00
Mikhail Glukhikh 5810ac01d2 FE1.0/FIR: slightly fix diagnostic messages about OptIn 2022-03-15 13:08:19 +00:00
Mikhail Glukhikh 779aa75855 Make FE1.0/FIR OptIn override message more clear 2022-03-10 09:09:51 +00:00
Mikhail Glukhikh d823020c07 Make FIR/FE1.0 report similar OptIn messages 2022-03-10 09:09:50 +00:00
Vladimir Dolzhenko 4de9de5fc5 Escape special Name used as parameter, custom function names etc
#EA-209929
#KT-51248 Fixed
2022-02-10 21:20:47 +00:00
Ivan Kochurkin 17c64cf955 [FIR] Add INV to UNARY_OPERATION_NAMES, ^KT-50998 Fixed 2022-02-07 17:22:02 +03:00
Dmitriy Novozhilov 52b72a7dac [FIR] Implement Int -> Long conversions for literals and operators over them
^KT-38895
^KT-50996 Fixed
^KT-51000 Fixed
^KT-51003 Fixed
^KT-51018 Fixed
2022-02-07 13:36:36 +03:00
Mikhail Glukhikh c255da815f Change some names in source code from useExperimental to optIn 2022-01-27 11:48:21 +00:00
Ivan Kochurkin defb0cf611 [FIR] Fix ambiguity between Sequence.forEach and Iterable.forEach (with @HidesMembers) ^KT-50776 Fixed 2022-01-21 19:34:10 +03:00
Denis.Zharkov a33d9df0cd NI: Support forking inference with heuristics
Mostly, it only affects FIR

It partially allows to consider several variance of constraints like
A<Int> & A<T> <: A<X_var> that are mostly brought by smart casts

^KT-49542 Fixed
^KT-50489 Relates
2022-01-11 20:45:55 +03:00
Irene Dea 13bff10567 Fix union related failures. 2022-01-08 15:26:44 +03:00
Irene Dea a98e2c4e03 Fix failed tests 2022-01-08 15:26:44 +03:00
Irene Dea 3c4989b672 Address JDK8/JDK6 issues with computeIfAbsent 2022-01-08 15:26:44 +03:00
Irene Dea 19bfc43bee Fixes and refactors 2022-01-08 15:25:07 +03:00
Irene Dea f2a351367c Implement unionTypeAttributes and replaceTypeAttributes in ConeInferenceContext 2022-01-08 15:25:07 +03:00
Irene Dea 56d817b49f Union type attributes for common super type calculation 2022-01-08 15:25:07 +03:00
Irene Dea 62bde2d686 Move AttributeArray to compiler.common so frontend extension can share it 2022-01-08 15:25:06 +03:00
Simon Ogorodnik 7b8ece8758 FIR: Make constraint injector treat stub types as type variables 2021-12-15 22:22:55 +03:00
Tianyu Geng a5844b754e Type Approximation: add separate flag to control approx. anonymous type
This extra flexibility is useful for IDE where we always want to
approximate anonymous types but may not want to approximate other local
 types
2021-12-15 16:09:27 +03:00
Mikhail Glukhikh 5b058cfcdc FIR2IR: support RawType internal annotation 2021-12-09 13:26:32 +03:00
Victor Petukhov 61d40403e7 [FE 1.0] Create captured star projection for self types by replacing type arguments deeply
^KT-49752 Fixed
2021-12-07 11:38:45 +03:00
Ilya Kirillov 19dec92247 Analysis API: rework declaration renderer
- refactor code to use PrettyPrinter instead of ad-hoc one
- do not print nested local declarations as this does not seem to have use-cases
2021-12-02 20:09:18 +01:00
Ilya Kirillov f722a54c78 Analysis API: separate constant values from annotation values 2021-12-02 20:09:16 +01:00
Anastasiya Shadrina e3f987459c [PSI, FE] Support functional types 2021-12-02 20:24:11 +03:00
Dmitriy Novozhilov cb0705ec03 [FIR] Change scheme of generating declarations by plugins
Methods `needToGenerateAdditionalMembersInClass` and
  `needToGenerateNestedClassifiersInClass` are removed, now compiler
  uses `get...Names` and `getTopLevel...` methods to determine which
  extension may generate declaration with specific classId/callableId

This is needed to simplify API of FirDeclarationGenerationExtension and
  provide guarantee that `generate...` method will be called with
  specific classId/callableId only if specific extensions returned name
  for this id from `getName...` functions
2021-11-23 15:01:28 +03:00
Artem Kobzar d5dd35cb20 feat(@JsExport for interfaces): add ability to export interfaces in TypeScript. 2021-11-18 10:07:38 +00:00
Jinseong Jeon 2dc2a90755 Introduce an API to convert TypeConstructorMarker to TypeParameterMarker 2021-10-28 12:54:45 +03:00
Sergej Jaskiewicz a367b91aa1 [IR] [Refactoring] Add toString and String::plus to IrBuiltins
Also use `OperatorNameConventions` constants instead of magic strings
2021-10-28 08:35:11 +00:00
Victor Petukhov 64c682f465 Remove constraints containing stub types after completion of the common system of a builder inference call
^KT-49285 Fixed
2021-10-26 19:37:59 +03:00
Tianyu Geng 6a59dc7fa5 FIR: add bfs helper and use it
It's also used in Kotlin quickfixes in intellij repo
2021-10-26 00:42:09 +02:00
Ilya Kirillov a11cd74b28 Revert "FIR: add bfs helper and use it"
This reverts commit dbb0496d23.
2021-10-26 00:37:31 +02:00