Commit Graph

85425 Commits

Author SHA1 Message Date
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
sebastian.sellmair 814a147a53 [Commonizer] Implement optimistic number commonization for typealias
When typealias point to a number of different bit width on
certain platforms, this implementation will choose
the number type with higher bit width as commonization result
for typealias types and typealias underlying types.

This will effectively port the "analyse code for a single
selected platform" UX approach into HMPP (for numbers only)

^KT-48455 Verification Pending
2021-08-30 19:25:41 +00:00
Alexander Udalov fbfbb0c72c CLI: support false and true values for boolean -X arguments
#KT-48417 Fixed
2021-08-30 19:45:03 +02:00
Alexander Udalov a37642e5af Minor, cleanup CLITool
Reformat, remove unused code which was copied to another place in
04b04ea0ee.
2021-08-30 19:45:02 +02:00
Alexander Udalov 0b11d4214c Make typeOf stable since 1.6
#KT-45396 Fixed
2021-08-30 19:36:32 +02:00
Alexander Udalov 98be418245 Uncomment new SinceKotlin and remove obsolete warning suppressions 2021-08-30 19:36:32 +02:00
Alexander Udalov 6c400ce864 Build: update kotlinLanguageVersion to 1.6
Update binary-compatibility-validator dependency to 0.7.1 to allow it to
read Kotlin metadata of version 1.6.

 #KT-48445
2021-08-30 19:36:32 +02:00
Denis.Zharkov 019001ca20 Optimize memory footprint related to empty/single element collections
^KT-47926 Related
2021-08-30 16:51:55 +03:00
Denis.Zharkov 112af9b145 FIR: Rework bare types support
^KT-48305 Fixed
2021-08-30 16:24:44 +03:00
Sergey Bogolepov 587146679d [K/N] Add tests for -Xbinary=freezing=... 2021-08-30 12:33:04 +00:00