Commit Graph

96900 Commits

Author SHA1 Message Date
Sebastian Sellmair ec9956041a [Gradle] Implement and re-use resolvableMetadataConfiguration for Source Sets
^KT-55289 Verification Pending
2022-12-12 20:29:07 +00:00
Sebastian Sellmair 764a57f126 [kotlin-tooling-core] Implement ExtrasLazyProperty
^KT-55289 Verification Pending
2022-12-12 20:29:07 +00:00
Sebastian Sellmair bd229584e4 [Gradle] Implement sources.jar resolvers
^KT-55289 Verification Pending
2022-12-12 20:29:07 +00:00
Yahor Berdnikau ff73e7a37a Fix version parsing crash on Gradle rich version string
Gradle accepts different types of version string declaration:
https://docs.gradle.org/current/userguide/single_versions.html. Now code
 should parse such declarations into semantic versioning without
 exception.

^KT-55255 Fixed
2022-12-12 19:26:07 +00:00
Yahor Berdnikau 25553b81d5 Fix local bootstrap fails to import into IDEA
Included builds fails to find root dir bootstrap directory and fails
with unresolved dependency error.
2022-12-12 16:52:15 +00:00
Mikhail Glukhikh 6111daa8f7 Fix a pair of broken lazy resolve tests after rebase 2022-12-12 17:27:19 +01:00
Ilya Kirillov 644d1bf0d0 [FIR] ignore tests which fail because of resolve contracts violation 2022-12-12 16:21:07 +00:00
Mikhail Glukhikh 43775a5912 [FIR] disable lazy resolve checks on building deserialized annotation arguments
During converting library annotations to FIR nodes
and building required scopes inside, lazyResolveToPhase may be called.
For such cases it's okay to skip the lazy resolve contract checks as
those declarations are always fully resolved and
lazy resolve will do nothing.
2022-12-12 16:21:07 +00:00
Mikhail Glukhikh b07d353fd4 Lazy...ResolverWithPhaseChecking: move to test sources 2022-12-12 16:21:07 +00:00
Mikhail Glukhikh 96d697e61b Lazy...ResolverWithPhaseChecking: add note about symbol current phase 2022-12-12 16:21:06 +00:00
Mikhail Glukhikh 1bb537a3f2 Cleanup: FirStatusResolveTransformer 2022-12-12 16:21:06 +00:00
Ilya Kirillov 7bac119f20 [FIR] add lazy resolution contract checks in resolve 2022-12-12 16:21:06 +00:00
Mikhail Glukhikh df5aa59185 K2: Don't use FirTypeParameterSymbol.resolvedBounds() from inference 2022-12-12 16:21:05 +00:00
Nikolay Krasko e57521ed23 Remove bintray mentioning from the servers list 2022-12-12 15:53:23 +00:00
Nikolay Krasko 014e764644 Remove explicit set of encoding from the build script
Setting is now set in gradle.properties since b5b58f40
2022-12-12 15:53:23 +00:00
Nikolay Krasko 7bf2685b5b Don't leave Gradle daemons after build scripts 2022-12-12 15:53:22 +00:00
Roman Golyshev 9702b97d8d [kotlin] KTIJ-23832 Select proper argument for Kotlin annotations in KtDefaultAnnotationArgumentReference
Kotlin annotations can be called without named parameters even if their
names are different from `value`. So there's no need to search for the
property named "value", since there might be none
2022-12-12 14:13:42 +01:00
Denis.Zharkov fd7559893e Fix deserialization exception for DNN types from Java
useCorrectedNullabilityForTypeParameters = true only might lead
to something becomes a DNN when otherwise it wasn't.

It seems safe to use it here, since if compiler has generated DNN, then
it's OK to assume that it checked necessary conditions, and it's likely
that it had useCorrectedNullabilityForTypeParameters = true as well, there.

Anyway, it looks saner than having an exception here.

Also, we assume here that metadata leading to exception might only be generated
with ProhibitUsingNullableTypeParameterAgainstNotNullAnnotated LF
(at least, we don't have contradicting evidences),
thus it's mostly a preparations in case we decide to enable
ProhibitUsingNullableTypeParameterAgainstNotNullAnnotated in 1.9.

^KT-55357 Fixed
^KT-55388 Related
^KT-36770 Related
2022-12-12 12:42:14 +00:00
Denis.Zharkov 9e8e5c5a36 Make sure that fix for KT-53041 works with additional LF
Previously, it worked by default because ProhibitUsingNullableTypeParameterAgainstNotNullAnnotated
was enabled by default since 1.8, but we have to disable it because of KT-55357

Turning off the fix by default is not a breaking change per se, because
1.8 has not yet been released.

^KT-55357 Related
^KT-36770 Related
^KT-53041 Open
2022-12-12 11:39:05 +00:00
Denis.Zharkov cd0d6d2773 Adjust test data for postponing ProhibitUsingNullableTypeParameterAgainstNotNullAnnotated
^KT-55357 Related
^KT-36770 Related
2022-12-12 11:39:04 +00:00
Denis.Zharkov d34bd2e8c0 Postpone ProhibitUsingNullableTypeParameterAgainstNotNullAnnotated
The main reason is a bug in deserialization(KT-55357) that doesn't allow
to deserialize some binaries compiled with that feature enabled.

While we might fix it in 1.8.0, it doesn't help because previous
compilers, e.g. 1.7.0 still may break when using freshly recompiled
libraries.

Considering, that almost any meaningful fix might look unsafe for
the almost released 1.8.0, we can't enable the feature even in 1.9,
because 1.8.0 compilers wouldn't read those libraries anyway.

So, effectively this feature will be only enabled in K2.

^KT-55357 Related
^KT-36770 Related
2022-12-12 11:39:04 +00:00
Anton Lakotka 36591ab8a0 [Gradle] Replace toLowerCase/toUpperCase with ASCII-only variants
^KT-38712 Verification Pending
2022-12-12 10:47:44 +00:00
Anton Lakotka afb2bfe492 [Gradle, Test] Add JS target and presets names for checking incorrect...
... characters after setting Locale to Turkish.

^KT-38712
2022-12-12 10:47:43 +00:00
Anton Lakotka a37b548b9f [Gradle, Test] Reset locale to default when changing it for tests
Since `Locale.setDefault` is a global operation it will take effect on
other test causing them to produce unexpectable results.

^KT-38712
2022-12-12 10:47:43 +00:00
Evgeniy.Zhelenskiy f09fb5ed09 [IR] Enable tests for inline classes secondary constructors with body for not JVM
Signed-off-by: Evgeniy.Zhelenskiy <Evgeniy.Zhelenskiy@jetbrains.com>

#KT-55333
2022-12-11 22:06:47 +01:00
Evgeniy.Zhelenskiy abc1d942d1 [IR] Add tests for value classes secondary constructors with body and set language feature version for the feature
Signed-off-by: Evgeniy.Zhelenskiy <Evgeniy.Zhelenskiy@jetbrains.com>

#KT-55333
2022-12-11 22:06:47 +01:00
Jinseong Jeon 5f986fd467 ULC: fix PsiMethod#getThrowsList for accessors
^KTIJ-17761
2022-12-11 15:22:12 +00:00
Jinseong Jeon cc7083d59e SLC: implement PsiMethod#getThrowsList 2022-12-11 15:22:11 +00:00
Ilya Chernikov 42a0acac4f Scripting, IR: fix capturing of implicit receiver
#KT-55068 fixed
2022-12-11 09:08:55 +00:00
Ilya Chernikov 07af2d807a Scripting, tests: enable custom script tests with IR 2022-12-11 09:08:54 +00:00
Vyacheslav Gerasimov ba81bd052f Build: Include missing tests in jsTest, jsIrTest, jsFirTest tasks
Some tests were included only in common :js:js.tests:test task and
 missing in specialized test tasks (jsTest, jsIrTest, jsFirTest)
2022-12-09 20:42:08 +01:00
Vyacheslav Gerasimov 7d0935a8c5 Build: Refactor :js:js.tests:runMocha task
Introduce separate mochaTest task without dependency on test task
2022-12-09 20:42:07 +01:00
Ilya Kirillov b75bd179d4 [LL FIR] remove checkPce parameter from resolve, now we always check for PCE 2022-12-09 16:21:09 +00:00
Ilya Kirillov c2c615be99 [LL FIR] rework lazy annotation resolve for file to remove hacks
The previous solution blocked implementation of parallel resolve
2022-12-09 16:21:08 +00:00
Ilya Kirillov 3ad2b8a209 [LL FIR] rework FirDeclarationDesignation, so it can work with FirElementWithResolvePhase as a target 2022-12-09 16:21:08 +00:00
Ilya Kirillov b962fcddc8 [FIR] move file annotations to the FirFileAnnotationsContainer 2022-12-09 16:21:07 +00:00
Ilya Kirillov 67adc3fb1a [FIR] introduce FirFileAnnotationsContainer 2022-12-09 16:21:07 +00:00
Ilya Kirillov 8fd892176a [FIR] introduce FirElementWithResolvePhase class and make it a base class for FirDeclaration 2022-12-09 16:21:06 +00:00
Pavel Mikhailovskii 1a76804862 KT-51290 Account for context receivers when generating delegate function bodies 2022-12-09 15:36:45 +00:00
Pavel Mikhailovskii 08767d572b KT-51247 Fix resolution of functional types with context receivers 2022-12-09 15:29:39 +00:00
Pavel Mikhailovskii a4bde57d44 KT-51475 Add a test 2022-12-09 15:27:59 +00:00
Pavel Mikhailovskii 57ddb9fddf KT-53846 Pass context receivers to secondary constructors 2022-12-09 15:24:56 +00:00
Dmitriy Novozhilov bd3a28d04d [FE 1.0] Report INTEGER_OPERATOR_RESOLVE_WILL_CHANGE in missing cases
Covered places:
- local properties
- vars
- return positions of functions and lambdas

^KT-45970 Fixed
^KT-55358 Fixed
2022-12-09 15:10:03 +00:00
Dmitriy Novozhilov a979960e63 [FE 1.0] Add test for KT-45970 2022-12-09 15:10:02 +00:00
Dmitriy Novozhilov 3cffb33ab7 [FE] Drop ApproximateIntegerLiteralTypesInReceiverPosition language feature
This feature is not needed because it is unconditionally disabled for K1
  (because of not fully correct implementation) and unconditionally enabled
  in K2 (K2 does not support old behavior)

^KT-38895
2022-12-09 15:10:02 +00:00
Mikhail Glukhikh 26ff806440 EmptyIntersectionTypeChecker: don't take stub & error types into account
This commit fixes some tests broken by previous refactorings
2022-12-09 15:00:42 +00:00
Mikhail Glukhikh a7840d10d4 Drop unused AbstractTypeChecker.areRelatedBySubtyping 2022-12-09 15:00:42 +00:00
Mikhail Glukhikh 56c818e0a9 EmptyIntersectionTypeChecker: drop redundant checks + extra cleanup 2022-12-09 15:00:41 +00:00
Mikhail Glukhikh 758a4931e3 EmptyIntersectionTypeChecker: drop also incompatible supertypes check
Incompatible supertypes check also don't provoke runtime problems
in most situations, because this check is also bound to type argument
conflict. Related to KT-54411
2022-12-09 15:00:41 +00:00
Mikhail Glukhikh 29ad5f981c Extract EmptyIntersectionTypeKind.isDefinitelyEmpty to a property 2022-12-09 15:00:41 +00:00