Commit Graph

87184 Commits

Author SHA1 Message Date
Dmitriy Dolovov 51f30ed995 [Native][tests] localDelegatedPropertyLink - don't use golden data 2021-09-01 10:13:50 +03:00
Dmitriy Novozhilov f85c137360 [FIR] Don't fail on serialization of annotations which are not lays on classpath 2021-09-01 10:01:37 +03:00
Alexander Shabalin ed0b65e19c [K/N] A bit more on the new MM 2021-09-01 06:54:09 +00:00
Ivan Gavrilovic f0f5e11e72 MPP Gradle - Stop using convention mapping for archive name (#4529)
The "archiveFile" property is deprecated on the jar task, and
archiveFileName is used in this commit. Also, this fixes an
issue in Gradle where convention mapping is incorrectly
deserialized from configuraiton cache.

Original issue: https://issuetracker.google.com/193558867
Test: testJvmWithJavaConfigurationCache
2021-09-01 09:01:52 +03:00
Leonid Startsev 3102e9f614 Support properties from other modules in 'declaresDefaultValue'
Add box test using new test infra
Move serialization tests to misc compiler tests

Fixes https://github.com/Kotlin/kotlinx.serialization/issues/1602
Fixes https://github.com/Kotlin/kotlinx.serialization/issues/1481
2021-08-31 20:36:25 +00:00
Alexander Udalov ffe0d9de70 Psi2ir: do not sort descriptors for fake override generation
Descriptors are already supposed to be sorted in scopes. The problem is
that rendering descriptors for sorting takes a lot of time (~1.5% of
total compilation time of intellij with JVM IR), and simple heuristics,
like comparing by names first, don't fully help with it.

 #KT-48233
2021-08-31 20:25:59 +02:00
Alexander Udalov cc52832943 JVM IR: fix incorrect type of IrCheckNotNull intrinsic
It is not correct to assume that arg0 has been generated to have the
same IrType as the whole expression.

The reason it only backfired in throwing exceptions probably has to do
with the fact that visitThrow might be the only place in
ExpressionCodegen right now which uses the IrType from PromisedValue to
make a decision on whether to generate checkcast.

It seems suspicious that ExpressionCodegen.visitFieldAccess/visitCall
return PromisedValue whose IrType mentions type parameters which are
declared outside of the call site, but that should probably be
investigated separately.

 #KT-48440 Fixed
2021-08-31 18:45:23 +02:00
Svyatoslav Scherbina 1d5501c047 kotlin-native/NEW_MM.md: add known issue 2021-08-31 15:57:01 +00:00
Mikhail Glukhikh c175039afb Add test for JVM_RECORD_NOT_LAST_VARARG_PARAMETER 2021-08-31 18:28:59 +03:00
Mikhail Glukhikh 881b15a677 FIR: use typeWithStarProjections for protected visibility check 2021-08-31 17:32:02 +03:00
Mikhail Glukhikh a14a00809f FIR: use lookup tag instead of class id in visibility checker 2021-08-31 17:31:59 +03:00
Mikhail Glukhikh 08e498f1f2 FIR: add proper receiver check for protected visibility #KT-48378 Fixed 2021-08-31 17:31:57 +03:00
Dmitry Petrov 1c1b9547c1 JVM_IR KT-48435 use Java-like counter loop when possible 2021-08-31 16:39:25 +03:00
Sergey Bogolepov d4c91c96d3 [K/N] Fix objc_acr_contract test in two_stage mode 2021-08-31 12:52:42 +00:00
Denis.Zharkov c23de2dae8 FIR: Unignore test on StrictJavaNullabilityAssertions
^KT-48302 Fixed
2021-08-31 15:41:18 +03:00
Denis.Zharkov 4a9d4ed9fe Enable ProhibitUsingNullableTypeParameterAgainstNotNullAnnotated since 1.7
^KT-36770 Fixed
2021-08-31 15:41:17 +03:00
Denis.Zharkov d91155558b Rename LF: DefinitelyNotNullTypeParameters -> DefinitelyNonNullableTypes 2021-08-31 15:41:17 +03:00
Denis.Zharkov 0e7d51b04d Prohibit using definitely-non-nullable types as arguments for reified parameters
^KT-26245 In Progress
2021-08-31 15:41:16 +03:00
Denis.Zharkov 62bef48f9d Adjust test data to changed rendering: T!! -> T & Any
^KT-26245 In Progress
2021-08-31 15:41:15 +03:00
Denis.Zharkov dc79d8641b Change rendering for definitely non-nullable types from T!! to T & Any
^KT-26245 In Progress
2021-08-31 15:41:14 +03:00
Denis.Zharkov 9e6af52e1f Enable DefinitelyNotNullTypeParameters since 1.7
^KT-26245 In Progress
2021-08-31 15:41:13 +03:00
Denis.Zharkov c1b5d5551f Drop support for T!! syntactic structure
^KT-26245 In Progress
2021-08-31 15:41:13 +03:00
Denis.Zharkov 302eacbf59 Support new form of definitely non-nullable types: T & Any
^KT-26245 In Progress
2021-08-31 15:41:11 +03:00
Denis.Zharkov cdd8d1c163 Add AND (&) token 2021-08-31 15:41:09 +03:00
Alexander Shabalin f265cd49ea [K/N] Feedback section for the new MM migration guide 2021-08-31 12:30:54 +00:00
Alexander Udalov 04c5bbdcf8 JVM IR: change generation scheme of property $delegate methods
Generate $delegate method as instance method in
PropertyReferenceDelegationLowering, and remove dispatch receiver later
in MakePropertyDelegateMethodsStatic. The method needs to be static to
be non-overridable (see delegateMethodIsNonOverridable.kt), and public
to be accessible in reflection.

Otherwise we generated incorrect IR where a static function accessed an
instance field of the containing class, which failed in multiple places
including LocalDeclarationsLowering.

 #KT-48350 Fixed
2021-08-31 14:07:22 +02:00
Mark Punzalan 50508da156 HL API: Add type parameters and visibility to KtTypeAliasSymbol. 2021-08-31 14:59:06 +03:00
Mark Punzalan c2529a4abb HL API: Handle resolve case when source for FirResolvedQualifier is a
KtCallExpression.
2021-08-31 14:59:06 +03:00
Mark Punzalan cba77452f3 FIR: Add candidates to ConeFunctionCallExpectedError. 2021-08-31 14:59:06 +03:00
Mark Punzalan 16eabf0ff1 FIR: Add ConeDiagnosticWithCandidates and
ConeDiagnosticWithSingleCandidate to ConeDiagnostic type hierarchy.
2021-08-31 14:59:06 +03:00
Mark Punzalan db38cd95da HL API: Add candidate symbols to KtClassErrorType.
Also remove redundant
FirReferenceResolveHelper.getFirSymbolsByErrorNamedReference() in favor
of FirUtils.getCandidateSymbols(), and add more candidate symbols from
more ConeDiagnostic subclasses.
2021-08-31 14:59:06 +03:00
Mark Punzalan fb0d946e50 HL API: Make all symbol marker classes inherit from KtSymbol. 2021-08-31 14:59:06 +03:00
Sergey Bogolepov dc29618857 [K/N] Fix KT-48523 2021-08-31 11:54:45 +00:00
Mark Punzalan 34e6459014 FIR: Ensure that the array set argument (on RHS of =) is always mapped
to the last parameter of the set operator function, even if there are
missing or too many index arguments.
2021-08-31 14:52:28 +03:00
SvyatoslavScherbina 2bb3e94ef7 kotlin-native/NEW_MM.md: update Kotlin version 2021-08-31 13:59:47 +03:00
Ilmir Usmanov 0733dbf2d5 Minor. Regenerate tests 2021-08-31 12:05:35 +03:00
pyos 5e4f022c59 JVM_IR: use nullability when boxing/unboxing inline class types
Given inline class V(Any?), a coercion from (Object, V) to (Object, V?)
is boxing.

In theory, the same issue in the old backend can be fixed by making
`KotlinTypeMapper.mapUnderlyingTypeOfInlineClassType` use
`computeExpandedTypeForInlineClass`, but for some reason this breaks a
lot of stuff.

 #KT-48430 Fixed
2021-08-31 12:05:34 +03:00
Svyatoslav Scherbina d4a8c51637 Native: report a warning on invalid characters in identifiers
This will become an error in Kotlin 1.7.

^KT-46182 Fixed
2021-08-31 08:50:14 +00:00
Svyatoslav Scherbina 64dc19fafb Update kotlin-native/NEW_MM.md 2021-08-31 08:30:09 +00:00
Sergey Bogolepov 712f7daeb2 [K/N] mention freezing binaryOption in NEW_MM.md 2021-08-31 07:40:46 +00:00
Steven Schäfer b2e6e075ab Parcelize: Fix diagnostics for parcelable value classes 2021-08-31 02:48:03 +02:00
Mikhail Glukhikh 153ca8675f Fail fast in case of invalidation in getContributedClassifier
Related to IDE problems like descriptor not found
2021-08-31 00:25:38 +03:00
Jinseong Jeon 24abf7168c FIR LC: get origin of property accessors via light member origin 2021-08-30 23:13:23 +03:00
Jinseong Jeon dbce9b3d45 FIR LC: use FirLightParameterList for setter parameter
to preserve the parent chain from setter parameter to setter
2021-08-30 23:13:22 +03:00
sebastian.sellmair 5a63498963 [Commonizer] Use qualified name string for 'UnsafeNumber' annotation
^KT-48459
^KT-48455
2021-08-30 19:25:43 +00:00
sebastian.sellmair e7e3cedf69 [Commonizer] Finalize tests for ^KT-48455 2021-08-30 19:25:43 +00:00
sebastian.sellmair 60ccdf23ea [Commonizer] Choose lower bit width numbers for optimistic number commonization
^KT-48455
2021-08-30 19:25:43 +00:00
sebastian.sellmair 642bb68916 [Commonizer] Rename TargetDependentCommonizer.kt to SingleInvocationCommonizer.kt 2021-08-30 19:25:42 +00:00
sebastian.sellmair f7839e847a [Commonizer] Emit 'UnsafeNumber' for optimistically commonized typealias
^KT-48459 Verification Pending
2021-08-30 19:25:42 +00:00
sebastian.sellmair bff62aba5f [Native] Implement 'kotlinx.cinterop.UnsafeNumber' interface
^KT-48459
2021-08-30 19:25:41 +00:00