Commit Graph

91067 Commits

Author SHA1 Message Date
Svyatoslav Scherbina 085e2448cd ObjCExport: don't use autorelease when sending arguments to Swift/Obj-C 2022-02-08 15:17:04 +00:00
Svyatoslav Scherbina 9326978327 ObjCExport: fix noAutorelease tests for the new MM 2022-02-08 15:17:04 +00:00
Svyatoslav Scherbina d161108be3 ObjCExport: fix noAutorelease/testReceiveBlockFromSwiftAndCall
The test expects to track block result lifetime in Swift, so we should
add it to the tracker.

Also fix the same problem for testReceiveBlockFromKotlinAndCall
(which didn't fail because we added the block itself to the tracker).
2022-02-08 15:17:04 +00:00
Hung Nguyen d018031cbf KT-45777: Clean up build cache tests for incremental compilation
- Clean up BuildCacheRelocationIT.testKotlinIncrementalCompilation
 - Delete BuildCacheIT.testKotlinCompileIncrementalBuildWithoutRelocation
   as it is already covered by the test in BuildCacheRelocationIT
 - Add BuildCacheRelocationIT.testKotlinIncrementalCompilation_withClasspathSnapshot
- Updated BuildCacheRelocationIT.testKotlinIncrementalCompilation_withClasspathSnapshot
2022-02-08 18:07:38 +03:00
sebastian.sellmair 200cc9f75f [Gradle][MPP] Disabled CInteorp warning: Show cinterops instead of compilations
KT-51176
2022-02-08 09:22:15 +01:00
sebastian.sellmair 56de13fe2f [Gradle][MPP] Show (potential) warning on disabled cinterop commonization
^KT-51176 Verification Pending
2022-02-08 09:22:15 +01:00
Roman Golyshev 42010282d5 [FIR IDE] Use correct extension receiver FIR expression in completion
`getOrBuildFir` does not record `FirCheckedSafeCallSubject`
expression, and it would be impossible to get them anyway
since there are no PSI corresponding to "not null receiver"
in expressions like `foo?.bar` - there is only `foo`,
which is considered nullable by FIR

`FirCheckedSafeCallSubject` wrapper has non-null type during
resolve, and it becomes very important in
`KtFirCompletionCandidateChecker`. If we loose the wrapper,
then it would be impossible to call extensions on nullable
types using `?.` syntax

^KTIJ-21021 Fixed
2022-02-07 22:06:28 +00:00
Ivan Kochurkin f32c355190 [FIR] Correct resolving of sam with suspend function from another module, ^KT-51007 Fixed
Ignore fir ide test probably because of KT-50732
2022-02-07 17:22:02 +03:00
Ivan Kochurkin 17c64cf955 [FIR] Add INV to UNARY_OPERATION_NAMES, ^KT-50998 Fixed 2022-02-07 17:22:02 +03:00
Ivan Kochurkin 30871fc08f [FIR] Infer labeled type for lambda in return in catch ^KT-51009 Fixed 2022-02-07 17:22:01 +03:00
Ivan Kochurkin d82dff0e75 [FIR] Refactor findMaximallySpecificCall
Remove generic and function arguments from methods
2022-02-07 17:22:01 +03:00
Ivan Kochurkin 635166c969 [FIR] Get rid of excess allocations in FlatSignature 2022-02-07 17:22:00 +03:00
Ivan Kochurkin a0510f4a67 [FIR] Fixed Replace ConeTypeVariable on ConeTypeParameter ^KT-51017
in AbstractConeCallConflictResolver.computeParameterTypes
2022-02-07 17:21:59 +03:00
Ivan Kochurkin 5391ee91af [FIR2IR] Fix incorrect type of typealias for suspend functional type, ^KT-50997 Fixed 2022-02-07 17:21:59 +03:00
Ivan Kochurkin 828c442518 [FIR] Fix TYPE_VARIANCE_CONFLICT location for function type with receiver
It should be covered by an example from KT-50947
2022-02-07 17:21:58 +03:00
Ivan Kochurkin 8a8bdc9ff4 [FIR2IR] Fix synthetic property reference in delegate expression 2022-02-07 17:21:58 +03:00
Mads Ager a398f7d6cb Rename kt-reference module to kt-references. 2022-02-07 15:01:24 +01:00
Mads Ager 17aee1e944 Move frontend independent parts of KtReference.isReferenceTo up to share it. 2022-02-07 15:01:24 +01:00
Mads Ager 6f0bb0eda5 Add analysis:kt-reference module and move KtReferences there. 2022-02-07 15:01:23 +01:00
Yahor Berdnikau 5320a32d67 Check also the cause of throwable for OOM exception
Sometimes OOM exception is the cause of some higher-level one
exception in compilation.

^KT-51116 Fixed
2022-02-07 13:59:48 +00:00
Dmitriy Novozhilov 5b79279590 [Test] Add test data of raw FIR tests to Test Helper Plugin paths 2022-02-07 16:17:37 +03:00
Ilya Goncharov 77b367fe96 rra/ilgonmic/ic-to-compiler
[JS IR] Fix compilation in tests

[JS IR] Fix test after migrating IC to compiler

[JS IR] Fix memory leak

[JS IR] Move js ic to compiler

Merge-request: KT-MR-5673
Merged-by: Ilya Goncharov <Ilya.Goncharov@jetbrains.com>
2022-02-07 11:40:16 +00:00
Dmitriy Novozhilov aadfc59d0f [FIR] Complete delegated constructor calls without proper constructed type
This is needed to definitely complete arguments of such calls
2022-02-07 13:36:38 +03:00
Dmitriy Novozhilov 1591518cf6 [FIR] Support constant unary operators for integer literal operators
^KT-38895
2022-02-07 13:36:37 +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
Dmitriy Novozhilov cc86ca2a0f [FIR] Extract common code for converting unaryMinus call on integer literal 2022-02-07 13:36:36 +03:00
Dmitriy Novozhilov 563e649ac3 [FIR] Introduce special ReceiverResolution resolution mode for resolution of receivers of calls
This resolution mode is needed to determine do we need approximate
  integer operator calls or not
2022-02-07 13:36:35 +03:00
Dmitriy Novozhilov b980f5ab32 [FIR] Introduce new kind of integer literal types for constant operator calls 2022-02-07 13:36:35 +03:00
Dmitriy Novozhilov bb5217be72 [FIR] Don't create ILT for integer literal if its value don't fit to Int type 2022-02-07 13:36:34 +03:00
Dmitriy Novozhilov 10c38ba47c [FIR] Reorganize cone type utilities
Make some overrides of members of Cone types final
2022-02-07 13:36:34 +03:00
Dmitriy Novozhilov 0bd3e8f418 [FIR] Rename ConeClassErrorType to ConeErrorType, drop ConeKotlinErrorType alias 2022-02-07 13:36:33 +03:00
Dmitriy Novozhilov 9c6292db6f [FIR] Split cone types declarations into multiple files 2022-02-07 13:36:33 +03:00
Dmitriy Novozhilov 84913772ec [FIR] Drop redundant FirIntegerOperatorCall and number of fir copy methods 2022-02-07 13:36:32 +03:00
Dmitriy Novozhilov 27901a55c4 [FP] Show number of failed modules in report of FullPipeline test 2022-02-07 13:36:31 +03:00
nataliya.valtman 56207abc27 KT-34862: Add kotlin build dir as output
build history files are non cacheable outputs
#KT-34862
2022-02-07 10:09:36 +00:00
Roman Golyshev 7c9000b8ac [FIR IDE] Consider FirFileSymbol in KtSymbolByFirBuilder.buildSymbol 2022-02-06 15:29:54 +03:00
Roman Golyshev 793758a822 [FIR] Remove factory methods from abstract providers 2022-02-06 15:29:53 +03:00
Roman Golyshev 57c30ee2d1 [FIR] Add some kdocs to FirRegisteredPluginAnnotations 2022-02-06 15:29:53 +03:00
Roman Golyshev aabd5d98bb [FIR] Fix confused metaUnder and metaHas 2022-02-06 15:29:52 +03:00
Ilya Gorbunov 771eff503b stdlib-docs: Use local ext link to stdlib instead of default
When building kotlin.test docs, do not query kotlinlang.org
for stdlib package list, but use the one built locally beside.
This avoids build failures when the site is not available.
2022-02-05 06:21:49 +00:00
Alexander Udalov 6fb11686c9 Psi2ir: further reduce used stack for binary expressions 2022-02-05 06:21:13 +00:00
Dmitry Petrov e111c60458 PSI2IR fix SOE in testKt47450 (again) 2022-02-05 06:21:13 +00:00
Steven Schäfer 78d80181e2 inlineClassUtils: Fix handling of inline classes without constructors
Fixes KT-50992

DeclarationDescriptor.isInlineClass misidentifies inline classes without
constructors. This can happen for the ABI of inline classes with private
constructors.
2022-02-04 23:30:24 +01:00
Mads Ager aa6ba18c39 Remove references to annotation-based-compiler-support 2022-02-04 19:03:33 +01:00
Sergej Jaskiewicz 28c0ff8e99 [TestData Helper Plugin] Add related files search paths 2022-02-04 19:15:11 +03:00
Artem Kobzar 33918156e1 feat(JsCode): inline usage of js code which captures kotlin variables. 2022-02-04 15:08:22 +00:00
Vyacheslav Gerasimov 96cee0f917 Use internal docker repo for space dev environment image 2022-02-04 17:32:42 +03:00
Pavel Kirpichenkov 4eb2c2f6f1 Minor: reformat 2022-02-04 16:57:22 +03:00
Pavel Kirpichenkov 0362d4ac9f [MPP] workaround inc/dec operator checks in expect classes
Implicit receiver type inside expect class is inconsistent with the
type resolved from an explicit reference inside that class. The former
one is a default class type, i.e. expect; the latter one resolves to
an actual type when either expect and actual are in the same module, or
when the sources are compiled for a particular platform.

The workaround is to manually actualize implicit receiver type for one
particular check affected by the broken subtyping.

KT-49714
2022-02-04 16:57:22 +03:00
Pavel Kirpichenkov 90abbb4a9f [MPP] Add test for inc/dec check in expect class
KT-49714
2022-02-04 16:57:21 +03:00