Commit Graph

103945 Commits

Author SHA1 Message Date
Kirill Rakhman b24afa0177 [FIR] Regenerate FIR tree after FirExpression.coneTypeOrNull introduction
#KT-59855
2023-08-24 07:54:57 +00:00
Kirill Rakhman bec39a9258 [FIR] Change FIR structure by replacing FirExpression.typeRef with cone type
#KT-59855
2023-08-24 07:54:56 +00:00
Kirill Rakhman 270aa1656f [FIR] Add default parameter values to ClassId.constructClassLikeType
#KT-59855
2023-08-24 07:54:56 +00:00
Kirill Rakhman e50025f21f [FIR2IR] Replace FirExpression.typeRef.toIrType with coneType.toIrType
#KT-59855
2023-08-24 07:54:56 +00:00
Kirill Rakhman 9ec814b7ad [FIR] Replace FirExpression.typeRef.coneType (and variants) with FirExpression.coneType
#KT-59855
2023-08-24 07:54:56 +00:00
Kirill Rakhman 1472b21993 [FIR] Don't use called declaration as source for call typeRef
Otherwise, we end up with sources pointing to different files.

#KT-60760 Fixed
2023-08-24 07:54:56 +00:00
Nikolay Lunyak 82c18ff26b [FIR] Report NON_MEMBER_FUNCTION_NO_BODY
^KT-59944 Fixed
2023-08-24 07:49:20 +00:00
Ilya Gorbunov e103318432 kotlin-test-js: assemble sources jar that combines common and platform sources, KT-61315, KTIJ-23784 2023-08-24 01:24:07 +00:00
Dmitrii Gridin 2cb6ee81a1 [LL FIR] add guards to type resolver
We should protect return types from value parameters/property accessors
and backing fields from repeatable modifications.
Such declarations can be modified during type resolution by
`transformTypeToArrayType` or property getter type propagation,
so we should be able to restore the original reference in the case of
exceptions (PCE for instance)

^KT-61422
2023-08-23 20:05:18 +02:00
Dmitrii Gridin 2f8a64fff2 [AA FIR] fix exception from vararg parameter with invalid type
It is true that for vararg parameter `arrayElementType` always have to
be not null, but it required resolution to TYPES phase. But in case of
the error type, the type reference is treated as resolved, so we are not
obligatory to resolve such reference to TYPES, because we already have
the resolved type.
So we can make the rule of KtFirValueParameterSymbol#returnType less
strict, and varargElementType will effectively do the same as
lazy resolve + arrayElementType

^KT-61422 Fixed
2023-08-23 20:05:18 +02:00
Leonid Startsev 6e4d033f89 Promote deprecation on Flags API to ERROR
#KT-59440
2023-08-23 16:47:05 +00:00
Leonid Startsev 06c471d413 Remove deprecated Flag usages in MetadataDeclarationsComparator.kt
#KT-59440
2023-08-23 16:47:05 +00:00
Pavel Punegov 2b6ca6d8e1 [K/N] Exclude a part of the test that fails due to the ^KT-61418 2023-08-23 15:40:07 +00:00
Jingbo Yang 7a13173e6a Support fileAccessHistoryReportFile in KAPT
This change expanded KAPT to support a new param
'fileAccessHistoryReportFile', which reports all the classes used during
 annotation processing into a file, in the form of a list of URIs.

This is useful for build speed improvements described in https://engineering.fb.com/2017/11/09/android/rethinking-android-app-compilation-with-buck/.
Essentially, using the list of used classes, we can compile only
the dependencies that are really affected by the developer's
code changes and improve Kotlin build speed.

^KT-52853
2023-08-23 14:59:59 +00:00
Dmitriy Novozhilov 1b49ae3aab [Build] Update verification-metadata.xml 2023-08-23 14:57:22 +00:00
Dmitriy Novozhilov b193dc50b4 [Build] Exclude :scripting:dependencies-maven-all from JPS compilation 2023-08-23 14:57:22 +00:00
Dmitriy Novozhilov 20c46738b4 Advance bootstrap to 1.9.30-dev-1098 2023-08-23 14:57:21 +00:00
Troels Bjerre Lund f67ec22c24 [K/N] Fix the native performance benchmark build
kotlin.native.concurrent.FreezableAtomicReference was depricated, so it
has been replaced by a kotlin.concurrent.AtomicReference
2023-08-23 14:29:29 +00:00
Alexander Shabalin efa59eb589 [K/N] Adjust values for the initial and minimum heap sizes ^KT-61092 2023-08-23 14:00:32 +00:00
Mikhail Glukhikh 5ee50f50b5 K2/LC: set hasBackingField to false for expect properties
#KT-61173 Fixed
2023-08-23 13:48:48 +00:00
Roman Efremov 6b217369a8 [FE1.0] Fix false reporting of non-matching annotations in IDE...
...when typealiased expect class used in class literal.

^KTIJ-26700 Fixed
2023-08-23 13:15:20 +00:00
Roman Efremov 3124cbcbad [FE, IR] Refactor: rename areAnnotationArgumentsEqual parameters
Rename to "expect" and "actual" annotation.
This will be needed in next commit to make it clear that
only expect annotation value needs special handling.

^KTIJ-26700
2023-08-23 13:15:20 +00:00
Roman Efremov 77ab13400e [FE1.0] Fix false reporting of non-matching actual annotations in IDE
It was reported because in composite module analysis we have both expect
and actual annotation descriptors, which may differ.
This may lead to bugs in the checker of ACTUAL_ANNOTATIONS_NOT_MATCH_EXPECT
diagnostic.

`fqName` comparison can be safely removed, because we already check
types in `areCompatibleExpectActualTypes`.

Tests:
- typealiasedAnnotation.kt - for annotation use (so it has different
ClassId)
- typealiasedAnnotationAsArgument.kt - when typealiased annotation
used in another annotation as argument
- sourceRetentionAnnotationsWhenTypealias.kt - tests same as
compiler/testData/diagnostics/tests/multiplatform/annotationMatching/sourceRetentionAnnotationsWhenTypealias.kt

No special test added for opt-in, because it's prohibited to have
expect/actual opt-ins by EXPECT_ACTUAL_OPT_IN_ANNOTATION checker.

^KTIJ-26700
2023-08-23 13:15:20 +00:00
Nataliya.Valtman dce1c1c70a Fix flaky tests with ConcurrentModificationException 2023-08-23 13:01:47 +00:00
Nikolay Lunyak 6e732f2f4d [FIR] Report NON_SOURCE_ANNOTATION_ON_INLINED_LAMBDA_EXPRESSION
^KT-59422 Fixed
2023-08-23 12:39:23 +00:00
Nikolay Lunyak ed6a0af0a6 [FIR] Report DUPLICATE_PARAMETER_NAME_IN_FUNCTION_TYPE
^KT-59418 Fixed
2023-08-23 12:38:38 +00:00
Yahor Berdnikau 7d48a7934f [Gradle] Fix tryK2 was not applied to Kotlin/JS gradle plugin
^KT-61193 Fixed
2023-08-23 12:36:46 +00:00
Nikita Bobko c42d19f0e5 Cover KT-60646 with regression tests
This behavior wasn't intended during KT-15470 coding. I only intended to
prohibit `@get:` target on things different from properties. But I
accidentally prohibited `@property` on things different from properties
too

But it's a bug fix anyway, so let's keep it.

I also re-checked the implementation of KT-15470, I don't see any other
unintentional prohibitions
2023-08-23 12:35:51 +00:00
Nikita Bobko 7e4f9def83 Fix that INAPPLICABLE_TARGET_ON_PROPERTY_WARNING diagnostic is considered as an error
It was a stupid copy-paste typo. Please notice that this bug is only
presented in K2. In K1, INAPPLICABLE_TARGET_ON_PROPERTY_WARNING is a
warning.

But in K2, INAPPLICABLE_TARGET_ON_PROPERTY_WARNING doesn't matter as
much because it's only possible when LV <= 1.9. But K2 frontend doesn't
guarantee support of language flags that are < 2.0, anyway.

There are no tests because the test would be too trivial.
2023-08-23 12:35:50 +00:00
vmishenev 5c0c8ed2d5 Update Dokka to 1.9.10-dev
- Use analysis plugin configuration instead of `StdLibAnalysisConfigurationPlugin`
- Change SamplesTransformer plugin after Dokka refactoring
2023-08-23 12:33:40 +00:00
Alexander Shabalin 18fb2ec476 [K/N] Don't build distribution for deprecated targets ^KT-59008 2023-08-23 11:46:59 +00:00
Kirill Rakhman e96dcef571 [FIR2IR] Convert annotations on local delegated properties
#KT-60292 Fixed
2023-08-23 11:09:35 +00:00
Ilya Chernikov 85ca5294ef K2: add test for already fixed missing diagnostic issue
#KT-55956
2023-08-23 09:40:45 +00:00
Ilya Chernikov 4b7234d27e K2: add test for already fixed qualifier resolve issue
#KT-57845
2023-08-23 09:40:44 +00:00
Dmitrii Gridin 3debf36d60 [FIR] DFA: add missing unwrap for FirDesugaredAssignmentValueReferenceExpression
^KT-60319 Fixed
^KT-61407 Fixed
2023-08-23 09:15:25 +00:00
Dmitrii Gridin c01d27a61e [FIR] VariableStorageImpl: add debug info
^KT-60319
^KT-61407
2023-08-23 09:15:25 +00:00
Bogdan Mukvich 0aefd3b371 Add CODEOWNERS records for maven wrapper files 2023-08-23 09:07:28 +00:00
Pavel Kunyavskiy eefc51657a [K/N] Fix debug info for lambdas inside inline functions
^KT-57365
2023-08-23 08:18:56 +00:00
Pavel Kirpichenkov dc3641f79d Limit visibility of internal K/N decompiler classes
KTIJ-26526
2023-08-23 07:46:29 +00:00
Pavel Kirpichenkov af94b241ec Extract K/N decompiler related files into a separate module
KTIJ-26526
2023-08-23 07:46:29 +00:00
Pavel Kirpichenkov d7356afe1e Move K/N decompilers and stub builders to kotlin.git
KTIJ-26526
2023-08-23 07:46:29 +00:00
Aleksei.Glushko c5637ccc7e [K/N] Disable racy runtime test till better times
Merge-request: KT-MR-11788
Merged-by: Alexey Glushko <aleksei.glushko@jetbrains.com>
2023-08-22 21:04:26 +00:00
Dmitriy Novozhilov 10e45ee21a [FIR2IR] Disable lazy resolve checks at the very beginning of the FIR2IR 2023-08-22 18:36:21 +00:00
Dmitriy Novozhilov 250b94d5dd [FIR2IR] Create builtin IR class for @IntrinsicConstEvaluation manually if it is missing in stdlib
^KT-59151
2023-08-22 18:36:20 +00:00
Dmitriy Novozhilov 3f2e996803 [FIR2IR] Load builtin classes instead of creating them on the fly
This change uncovered KT-61282, which was hidden because of incorrect
  module fragments used as parent for builtin classes
2023-08-22 18:36:20 +00:00
Dmitriy Novozhilov f95ed2b588 [FIR2IR] Explicitly opt-in to IrSymbolInternals at call-sites
^KT-60924
2023-08-22 18:36:20 +00:00
Alexander Shabalin deb13257c2 [K/N] Make Any.equals simpler 2023-08-22 17:16:43 +00:00
Kirill Rakhman 27d25b90b1 [Tests] Fix test data 2023-08-22 16:06:24 +00:00
Mikhail Glukhikh 289dafa331 FIR2IR: don't apply SAM conversion for type parameter based types
#KT-58893 Fixed
#KT-58884 Fixed
2023-08-22 15:13:17 +00:00
Sebastian Sellmair a832510487 [Gradle] Use new Usage 'kotlin-commonized-cinterop' to differentiate cinterop commonizer configurations
^KT-61376 Verification Pending
2023-08-22 14:50:03 +00:00