Mikhail Glukhikh
4ed7504d87
FIR deserializer: apply attributes on type parameter-based types
...
#KT-62578 Fixed
2023-10-18 10:30:31 +00:00
Mikhail Glukhikh
fd057ac68a
FE: Add two more tests around KT-59561
2023-10-17 06:49:38 +00:00
Mikhail Glukhikh
9f6abfc166
K2/MPP: treat Array<Some> & Array<out Some> as similar types in annotations
...
#KT-59561 Fixed
Related to KT-61100
2023-10-17 06:49:38 +00:00
Mikhail Glukhikh
f085d0f660
K2: add reproduction of KT-61100 and KT-59561
2023-10-17 06:49:37 +00:00
Mikhail Glukhikh
bf65297d48
FIR2IR: make both 'multiplexing' offset-conversion functions not inline
...
This commit prevents duplication of lambda source code while inlining
offset-conversion functions.
2023-10-13 15:42:58 +00:00
Mikhail Glukhikh
f501c3870d
FIR2IR: make source range for implicit invoke call similar to PSI2IR
2023-10-13 15:42:58 +00:00
Mikhail Glukhikh
fe979cc822
K2: add source range test with extension lambda call
...
This test is equivalent to IDE debugger test
testNoParameterExtensionLambdaArgumentCallInInline3,
which changes behavior due to previous commit
2023-10-13 15:42:58 +00:00
Mikhail Glukhikh
b7b7dd1000
FIR2IR: make sources of qualified accesses & calls closer to PSI2IR
...
#KT-60111 Fixed
2023-10-13 15:42:58 +00:00
Mikhail Glukhikh
7c66a3dc65
Add source range test around multi-line calls
2023-10-13 15:42:58 +00:00
Mikhail Glukhikh
0fb4c9b4fe
FIR2IR: generate specific sources for property accessors
...
Related to KT-60111
2023-10-13 15:42:58 +00:00
Mikhail Glukhikh
f38b8fd8cb
K2: reproduce KT-60111
2023-10-13 15:42:58 +00:00
Mikhail Glukhikh
c4ec576a99
FIR2IR: make *Assign call origins closer to PSI2IR
...
#KT-60261 In Progress
2023-10-13 15:42:58 +00:00
Mikhail Glukhikh
13ae4abe52
FIR2IR: use elvis temporary variable name closer to PSI2IR
...
Related to KT-61983
2023-10-13 15:42:57 +00:00
Mikhail Glukhikh
d005d1cd68
Add accidentally forgotten IrSourceRangesDumpHandler to IR text tests
2023-10-12 15:06:47 +00:00
Mikhail Glukhikh
a5a8f6736b
Raw FIR: set source for setter parameter <set-?> access in delegated properties
...
Related to KT-59864
2023-10-10 13:38:52 +00:00
Mikhail Glukhikh
d321fa3fd9
K2: add partial reproduction of KT-59864
2023-10-10 13:38:52 +00:00
Mikhail Glukhikh
162ba59d7f
Raw FIR: set source for delegate field references
...
Related to KT-59864
2023-10-10 13:38:52 +00:00
Mikhail Glukhikh
9d3bf69212
Raw FIR/LT: use similar sources for delegated constructor calls
...
After this commit all IR source range tests behave in the same way
for FIR/PSI and FIR/LT, test data is now consistent
2023-10-10 13:38:52 +00:00
Mikhail Glukhikh
4ed6ece78b
Test: IR source ranges: make line/column -1 for negative offsets
...
Before this commit, test data for 'synthesizedDataClassMembers' test
was different between PSI and LT, because we had SYNTHETIC_OFFSET = -2
for synthetic functions and NaiveSourceBasedFileEntryImpl calculated
line/column as 0 for LT. In this commit the dumper was edited to
count -1 as line -1 / column -1 independent of a file entry used.
2023-10-10 13:38:51 +00:00
Mikhail Glukhikh
1d631500f5
Test: add K2 version of IR source ranges test
...
After this commit there are three different versions of
IR source range tests: classic (K1), FIR/PSI (K2), FIR/LT (K2).
Since 5 tests behave differently for FIR/PSI and FIR/LT,
in this commit their test data was set to FIR/LT state,
so relevant 5 tests are failing for FIR/PSI right now.
They will be fixed in two subsequent commits
Related to KT-59864, KT-60111, KT-59584
2023-10-10 13:38:51 +00:00
Mikhail Glukhikh
072757cdde
Test: convert IR source ranges test to the new infrastructure
...
Related to KT-59864, KT-60111, KT-59584
2023-10-10 13:38:51 +00:00
Mikhail Glukhikh
4da7453a7b
Add comment to TypeSystemCommonSuperTypesContext.checkRecursion
...
Related to KT-38544, KT-60581
2023-10-05 12:17:17 +00:00
Mikhail Glukhikh
aea7b8f00a
Common supertypes: unwrap captured type from DNN type during recursion control
...
This commit handles subtle situation when K1 represents flexible type
arguments as just T..T?, but K2 does it as T&Any..T?.
This can provoke a type like Captured(*)&Any..Captured(*)?,
and before this commit we couldn't find recursion inside Captured(*)&Any.
This could lead to explosions inside type system and inference errors
#KT-60581 Fixed
2023-10-05 12:17:17 +00:00
Mikhail Glukhikh
610a9d9c6a
K2: reproduce KT-60581
2023-10-05 12:17:17 +00:00
Mikhail Glukhikh
87904fd766
AbstractTypeChecker: don't create forks for identical supertypes
...
The main reason of this commit is the fact that it makes no sense
to create type checker forks in case of two or more types which equal
each other.
Also, this commit fixes the test taken from KT-59514
(see interconnectedGenerics.kt test changed in this commit).
In this particular case we have a subType of C.WithL<Pr!, En<Pr>!>,
and a superType of R<T> with a superType constructor R.
In findCorrespondingSupertypes we get *two* similar supertypes here,
both have a string representation of:
R<Il<@EnhancedNullability En<Pr>!>!>.
If we create two forks because of it, we get NEW_INFERENCE_ERROR
with the following subtyping violation:
Il<@EnhancedNullability En<Pr>!>! <: En<Pr>!.
NEW_INFERENCE_ERROR happens because we make a redundant fork in that case,
but the forks should still work despite it (see KT-62333).
These two types appear due to the content of FirCorrespondingSupertypeCache.
For a key C.WithL and a superType R it stores the following pair of supertypes:
- R<Il<@EnhancedNullability S>!>
- R<Il<(@EnhancedNullability S & Any, @EnhancedNullability S?)>!>
After substitution of S to En<Pr>! they become similar.
NB: if we change jspecify severity level from strict to warn,
then 'R<Il<(S & Any, S?)>!>' is the only remaining supertype,
and @EnhancedNullability annotation is no more in use.
The type hierarchy in this example looks like:
WithL<T, S> <: CanWithB<T, S>, R.F<S, Il<S>>
CanWithB<T, S> <: R.F<S, Il<S>>
R.F<S, Il<S>> <: R<Il<S>>
So R is reachable by two different ways, via CanWithB and directly via R.F.
#KT-59514 Fixed
2023-10-05 11:29:18 +00:00
Mikhail Glukhikh
d4ec088afe
K2: add reproduction for KT-59514
2023-10-05 11:29:18 +00:00
Mikhail Glukhikh
c860de6600
Use bootstrapped Native bundle with pre-release ON to fix Gradle tests
...
Related to KT-62058
2023-10-05 09:58:29 +00:00
Mikhail Glukhikh
52010e38e3
Temporarily mute failing tests around IS_PRE_RELEASE (related to KT-62058)
...
These tests should be fixed by bootstrapping
2023-10-05 09:58:29 +00:00
Mikhail Glukhikh
9bb1a0a31d
LV 2.0: set KotlinCompilerVersion.IS_PRE_RELEASE to true
...
#KT-62058 Fixed
2023-10-05 09:58:29 +00:00
Mikhail Glukhikh
8bd792792f
K2: consider backing fields of vars as smartcast unstable
...
#KT-61974 Fixed
2023-10-04 10:12:57 +00:00
Mikhail Glukhikh
8e577e101e
K2: reproduce KT-61974
2023-10-04 10:12:57 +00:00
Mikhail Glukhikh
9cf1d36e5e
K2: don't use outer class type parameters during nested class TP resolve
...
Before this commit, we allowed access to outer class type parameters
during resolve of type parameter bounds of a nested class.
In fact, outer type parameters are accessible in this situation
only if it's an inner class (or a local class).
This commit forbids such a usage. In the earlier fix of KT-57209
the same was done for regular type reference resolve.
#KT-61459 Fixed
#KT-61959 Fixed
2023-10-03 06:34:02 +00:00
Mikhail Glukhikh
cdc197c723
K2: reproduce KT-61959
2023-10-03 06:34:01 +00:00
Mikhail Glukhikh
92470484bf
K2: reproduce KT-61459
2023-10-03 06:34:01 +00:00
Mikhail Glukhikh
ae19cd91bf
K2: fix "private to this" determination logic in accordance with K1
...
#KT-61844 Fixed
2023-09-22 12:23:46 +00:00
Mikhail Glukhikh
b9302869d5
K2: reproduce KT-61844
2023-09-22 12:23:46 +00:00
Mikhail Glukhikh
2603077db9
Move independent pre-release tests to K2 group to avoid duplication
...
Without this commit these tests are run twice without any reason for it.
Related to KT-62058
2023-09-21 20:09:25 +00:00
Mikhail Glukhikh
156097fe17
Restore KotlinCompilerVersion.IS_PRE_RELEASE
...
This commit is a slightly modified revert of 4f29c113 .
IS_PRE_RELEASE allows to make LATEST_STABLE version behave as
experimental when this flag is set to true.
The general goal is to prepare fix of KT-62058; after this commit
one can do it by changing IS_PRE_RELEASE flag to true.
The fix of KT-62058 is planned to be done during bootstrapping.
This preparation and the future fix are parts of umbrella KT-61951.
2023-09-21 20:09:25 +00:00
Mikhail Glukhikh
488049174c
FP tests: take 'skipPrereleaseCheck' from module configuration
...
Before this commit we skipped this check for every module,
but now we skip it only if we need it
2023-09-21 15:01:21 +00:00
Mikhail Glukhikh
c33a6a665d
Revert "Mute a pair of intrinsic trim tests for old BE in LV 2.0"
...
This reverts commit 876a0768e4 .
Related to KT-59171
2023-09-21 12:38:22 +00:00
Mikhail Glukhikh
37ef18548e
Fix KotlinVersionsTest.testVersionsAreConsistent after TC version increase
...
Related to KT-59171, KT-61951
2023-09-21 12:38:22 +00:00
Mikhail Glukhikh
326d68c1f4
Drop separate K1/K2 implementations of generateMetadataExtraFlags
...
Related to KT-62056
2023-09-21 11:14:09 +00:00
Mikhail Glukhikh
8b8088720b
Rename: DeserializedContainerAbiStability.IR_UNSTABLE -> UNSTABLE
...
Related to KT-62056
2023-09-21 11:14:09 +00:00
Mikhail Glukhikh
a77b758efa
LV 2.0: drop reporting FIR_COMPILED_CLASS and relevant stuff
...
#KT-62056 Fixed
Related to KT-59171, KT-61951
2023-09-21 11:14:09 +00:00
Mikhail Glukhikh
1c6af76f61
Skip pre-release checks in FP tests
2023-09-20 15:57:54 +00:00
Mikhail Glukhikh
eb3f785c36
K2: drop state mutation from ResolvedLambdaAtom init block
...
Related to KT-61933
2023-09-20 15:42:03 +00:00
Mikhail Glukhikh
770bbd8f6b
K2: drop state mutation from LambdaWithTypeVariableAsExpectedTypeAtom init block
...
Related to KT-61933
2023-09-20 15:42:03 +00:00
Mikhail Glukhikh
14bc20652e
K2: process also arguments while calculating postponed atoms
...
#KT-61933 Fixed
2023-09-20 15:42:03 +00:00
Mikhail Glukhikh
0c287c9945
K2: reproduce KT-61933
2023-09-20 15:42:03 +00:00
Mikhail Glukhikh
46093c686e
KotlinVersionsTest: temporary convert to language update state
...
#KT-59171 Fixed
2023-09-19 15:46:31 +00:00
Mikhail Glukhikh
a40951d65d
Reformat KotlinVersionsTest
2023-09-19 15:46:31 +00:00
Mikhail Glukhikh
d1e4e6cc2e
LV 2.0: drop wrong comment on testRawTypes (KT-62043)
2023-09-19 15:46:31 +00:00
Mikhail Glukhikh
02961b7712
LV 2.0: fix Native Gradle integration test data
2023-09-19 15:46:31 +00:00
Mikhail Glukhikh
3e1f4c11dc
LV 2.0: drop a duplicating CLI test
2023-09-19 15:46:30 +00:00
Mikhail Glukhikh
198aa675cc
LV 2.0: add "not existing source path" test which uses K2
2023-09-19 15:46:30 +00:00
Mikhail Glukhikh
e4b70e7788
LV 2.0: update some CLI tests with warnings to use DIVISION_BY_ZERO warning
2023-09-19 15:46:30 +00:00
Mikhail Glukhikh
e5906a8a3a
LV 2.0: remove CLI tests covering quite obsolete legacy
2023-09-19 15:46:30 +00:00
Mikhail Glukhikh
db03cd8cd7
LV 2.0: update diagnostic message in MPP integration test
2023-09-19 15:46:30 +00:00
Mikhail Glukhikh
b7735506b0
LV 2.0: use bootstrapped Native bundle
2023-09-19 15:46:30 +00:00
Mikhail Glukhikh
7c68e73816
LV 2.0: fix test data in HierarchicalMppIT.testProjectDependencies
...
This commit contains two kind of fixes:
1) K2 does not create entries for empty subpackages anymore,
so for the file with 'package foo.bar.baz' it creates an entry
only for the main package 'foo.bar.baz' and not for 'foo' or 'foo.bar'
2) K2 uses changed format of the classpath for third party common lib,
now it looks like other dependencies 'name-of-lib-<version>-commonMain'
instead of 'name-of-lib-metadata-<version>'
2023-09-19 15:46:30 +00:00
Mikhail Glukhikh
556f3ee8d5
K2: use LATEST_STABLE in compiler tests instead of explicit 2.0
2023-09-19 15:46:29 +00:00
Mikhail Glukhikh
91acabc286
K2: don't use FastJarFS if output jar is used in classpath (KT-61883)
2023-09-19 15:46:29 +00:00
Mikhail Glukhikh
e8115820dd
LV 2.0: mute CompilerOutputTest.testReleaseCompilerAgainstPreReleaseLibrary
...
Related to KT-61773
2023-09-19 15:46:29 +00:00
Mikhail Glukhikh
45a12e0cfd
LV 2.0: fix JvmIdeServicesTest.testDependency by allowing unstable deps
2023-09-19 15:46:29 +00:00
Mikhail Glukhikh
796b9287e2
LV 2.0: fix diagnostic text in CliTestGenerated$Jvm.testWrongAbiVersion
2023-09-19 15:46:29 +00:00
Mikhail Glukhikh
96ea0c2eb8
LV 2.0: move testStrictMetadataVersionSemanticsOldVersion to pure K2 tests
2023-09-19 15:46:29 +00:00
Mikhail Glukhikh
8ba2cab989
LV 2.0: fix test data in CompilerSmokeTest
2023-09-19 15:46:29 +00:00
Mikhail Glukhikh
f6af5e6d03
LV 2.0: unmute/fix/delete some FirCompileKotlinAgainstCustomBinaries tests
2023-09-19 15:46:29 +00:00
Mikhail Glukhikh
bbdaa8c3ff
LV 2.0: prevent double-set of LV in Native compilation tests
2023-09-19 15:46:29 +00:00
Mikhail Glukhikh
d8b3dd683e
Use FIR compiler properly in AbstractTopLevelMembersInvocationTest
2023-09-19 15:46:29 +00:00
Mikhail Glukhikh
2dd9bdb89d
Separate incremental JS legacy / standard incremental test fails
2023-09-19 15:46:29 +00:00
Mikhail Glukhikh
fc2041e5b9
LV 2.0: allow unstable dependencies in kotlin-native/build-tools
...
Without this commit, build of this module fails during bootstrap
with FIR_COMPILED_CLASS
2023-09-19 15:46:29 +00:00
Mikhail Glukhikh
4133988d62
LV 2.0: temporarily mute 4 incremental MPP tests (KT-60831)
2023-09-19 15:46:29 +00:00
Mikhail Glukhikh
e4309c3318
LV 2.0: mute testCircularDependenciesWrongInternalFromTests (KT-61716)
2023-09-19 15:46:29 +00:00
Mikhail Glukhikh
6314183a55
LV 2.0: update diagnostics around visibility checks in JPS tests
2023-09-19 15:46:28 +00:00
Mikhail Glukhikh
cc2be502f6
LV 2.0: mute two MPP integration tests
2023-09-19 15:46:28 +00:00
Mikhail Glukhikh
ab2053df4b
Use K2/PSI in lookup tracker tests, fix test data in accordance with 2.0
...
#KT-60736 Submitted
2023-09-19 15:46:27 +00:00
Mikhail Glukhikh
f1a297279d
Fix Java LC test for LV 2.0 (see KT-60646)
2023-09-19 15:46:27 +00:00
Mikhail Glukhikh
876a0768e4
Mute a pair of intrinsic trim tests for old BE in LV 2.0
...
We muted tests in this commit because LV 2.0 shouldn't support old BE,
so this behavior is not important
2023-09-19 15:46:27 +00:00
Mikhail Glukhikh
e077be38f7
Migrate some Gradle tests to Kotlin 2.0
2023-09-19 15:46:27 +00:00
Mikhail Glukhikh
101166c8a7
K2/CLI tests in LV 2.0: drop warnings related to KT-56989
2023-09-19 15:46:27 +00:00
Mikhail Glukhikh
0a498660cb
Run K2 scripts in PSI mode
2023-09-19 15:46:27 +00:00
Mikhail Glukhikh
2a8b655294
Update tests after switching to LV 2.0
...
Related to KT-59171
2023-09-19 15:46:27 +00:00
Mikhail Glukhikh
5fb38008b7
Switch Kotlin version to 2.0
...
#KT-59171 In Progress
2023-09-19 15:46:26 +00:00
Mikhail Glukhikh
5e8741db1a
K2: deal with callable copy return type update more accurately
...
Related to KT-61443
2023-09-15 15:21:10 +00:00
Mikhail Glukhikh
f8ada456e4
K2: rename FakeOverrideTypeCalculator to CallableCopyTypeCalculator
...
This commits performs a rename.
According to KT-61443 this calculator is applicable not only to
fake (substitution/intersection) overrides.
2023-09-15 15:21:10 +00:00
Mikhail Glukhikh
53e4e2f6b1
K2: update return type properly for delegated members #KT-61443 Fixed
2023-09-15 15:21:10 +00:00
Mikhail Glukhikh
1b9197dd17
K2: reproduce KT-61443
2023-09-15 15:21:10 +00:00
Mikhail Glukhikh
ffd77850ef
K2: add proper catch parameter annotation targeting
...
In this commit we begin counting a catch parameter as
both a local variable and a value parameter for the purpose
of annotation targeting.
#KT-61691 Fixed
2023-09-13 11:27:14 +00:00
Mikhail Glukhikh
91aa679214
K2: reproduce KT-61691
2023-09-13 11:27:14 +00:00
Mikhail Glukhikh
20cb075e56
K2: fix calculating property reference type in delegated setter
...
This commit is an accidentally forgotten part of the KT-61045 fix
#KT-61720 Fixed
2023-09-08 15:35:10 +00:00
Mikhail Glukhikh
b0b6a6a05a
K1/K2: deduplicate/simplify the code around JVM CLI
...
Related to KT-61510, KT-61745
2023-09-08 13:20:47 +00:00
Mikhail Glukhikh
3561054998
K1/K2: partially share code for multi-module chunks building
...
#KT-61510 Fixed
Related to KT-61716
2023-09-08 13:20:47 +00:00
Mikhail Glukhikh
056e644b6d
FirBuiltinSymbolProvider: add a header comment describing built-ins
...
Related to KT-61330
2023-09-06 13:14:16 +00:00
Mikhail Glukhikh
c695d2759a
K2: add test plugin visitor checking source elements presence
...
Related to KT-60555, KT-61330
2023-09-06 13:14:16 +00:00
Mikhail Glukhikh
4d9457862f
K2: add sourceElement for binary Java classes
...
#KT-60555 Fixed
2023-09-06 13:14:16 +00:00
Mikhail Glukhikh
3ff2c7d6f7
K2: introduce custom Enum.entries migration checkers
...
Related to KT-56623, KT-56587
#KT-59344 Fixed
2023-08-31 13:29:02 +00:00
Mikhail Glukhikh
e0d68fc93e
K2: introduce FirEnumEntriesRedeclarationChecker (KT-59344)
2023-08-31 13:29:01 +00:00
Mikhail Glukhikh
d028f9ec95
K2: add stubs for enum entries deprecation diagnostics (KT-59344)
2023-08-31 13:29:01 +00:00
Mikhail Glukhikh
6ce096f0ed
K2: handle extra value parameter in FirCallCompleter properly
...
#KT-60450 Fixed
2023-08-28 14:02:56 +00:00