Commit Graph

96881 Commits

Author SHA1 Message Date
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
Mikhail Glukhikh 4d01ad439a EmptyIntersectionTypeChecker: simplify code 2022-12-09 15:00:40 +00:00
Mikhail Glukhikh 2a1a5c6936 EmptyIntersectionTypeChecker: drop questionable check of arguments
The situations with conflicting type arguments normally don't provoke
any runtime problems. Also, conflicts like A<T> VS A<SomeType> aren't
valid at all. Here we decided to remove them to avoid strange
and non-actionable warnings in user code.

#KT-54411 Fixed
2022-12-09 15:00:40 +00:00
Mikhail Glukhikh 832baf81e5 EmptyIntersectionTypeChecker: fix error in diagnostic text
Related to KT-54411
2022-12-09 15:00:39 +00:00
Mikhail Glukhikh 71c2aac280 coneDiagnosticToFirDiagnostic: minor formatting 2022-12-09 15:00:39 +00:00
Mikhail Glukhikh 7fed0c64f0 EmptyIntersectionTypeChecker: minor refactoring 2022-12-09 15:00:39 +00:00
Mikhail Glukhikh caf511acc5 EmptyIntersectionTypeChecker: make some names more clear 2022-12-09 15:00:38 +00:00
Mikhail Glukhikh e9ea66b9f1 EmptyIntersectionTypeChecker: fix typo in variable name 2022-12-09 15:00:38 +00:00
Mikhail Glukhikh d5c8d9fecc FE: add test reproducing KT-54411 2022-12-09 15:00:38 +00:00
Dmitriy Novozhilov c32d851585 Advance bootstrap to 1.8.20-dev-3892 2022-12-09 16:42:55 +02:00
Vladimir Dolzhenko b4aa2aef00 Add ability to invalidate AbstractResolverForProject
#KTIJ-23785

Merge-request: KT-MR-7900
Merged-by: Vladimir Dolzhenko <Vladimir.Dolzhenko@jetbrains.com>
2022-12-09 12:04:50 +00:00
Dmitriy Novozhilov 957987c16a [Test] Add testdata of AA tests to Test Helper plugin path 2022-12-09 12:02:09 +00:00
Dmitriy Novozhilov f8487ba545 [CLI] Filter out blank arguments from system environment 2022-12-09 12:02:09 +00:00
Dmitriy Novozhilov d898e256ca [FIR] Don't update explicit delegated constructor calls of classes with @JvmRecord
^KT-54573 Fixed
2022-12-09 12:02:08 +00:00
Dmitriy Novozhilov 880b278c40 [FIR] Deeply copy annotation type ref on COMPILER_REQUIRED_ANNOTATION_PHASE
The original idea was in resolving of annotation type ref using only
  importing scopes and accepting or discarding that resolution result
  depending on if this annotation is needed for compiler/plugins or not
But there is a problem that resolution of FirUserType with type resolver
  is not a pure operation: type resolver transforms qualifier parts which
  may contain type arguments, so if they were unresolved at the first
  resolve, they will stay unresolved forever. To prevent this we will
  deeply copy annotation type ref before first resolution

^KT-55286 Fixed
2022-12-09 12:02:08 +00:00
Dmitriy Novozhilov 2aad466d00 [FIR] Add test for KT-55286 2022-12-09 12:02:08 +00:00
Dmitriy Novozhilov a86bc425e5 [FIR2IR] Lookup for nested classes in scope in Fir2IrLazyClass
^KT-55269 Fixed
2022-12-09 12:02:07 +00:00
Dmitriy Novozhilov 866150a2e0 [FIR2IR] Add static functions to Fir2IrLazyClass.declarations
^KT-55269
2022-12-09 12:02:07 +00:00
Dmitriy Novozhilov 5d6cb2b691 [Test] Use IrPluginContext for searching declarations for DUMP_EXTERNAL_CLASS check 2022-12-09 12:02:07 +00:00
Dmitriy Novozhilov e7f6482857 [Test] Use DUMP_EXTERNAL_CLASS instead of invalid DUMP_DEPENDENCIES directive in ir text tests 2022-12-09 12:02:06 +00:00