Mikhail Glukhikh
11c006d14c
Fix result in JavaUsageTest (poisoning is now OFF)
2024-03-15 11:33:10 +00:00
Mikhail Glukhikh
c6e0268893
Revert "Temporary: make PRE_RELEASE_CLASS a warning in both K1/K2 (KT-66551)"
...
This reverts commit a0cb713d19 .
#KT-66551 Fixed
2024-03-15 11:33:10 +00:00
Mikhail Glukhikh
8ac576614f
Revert "Temporary: mute PRE_RELEASE_CLASS in some tests (KT-66551)"
...
This reverts commit 893e5cac
2024-03-15 11:33:10 +00:00
Mikhail Glukhikh
e22a2016b1
Revert "Temporary: make "Pre-release classes were found in dependencies" warning"
...
This reverts commit 92cf3e3343 .
2024-03-15 11:33:10 +00:00
Mikhail Glukhikh
6d02ce601a
Revert "Temporary: mute pre-release warnings in Gradle tests (KT-66551)"
...
This reverts commit 0757247233 .
2024-03-15 11:33:10 +00:00
Mikhail Glukhikh
a8bac70dec
Revert "Temporary: comment the last check in JavaUsageTest (KT-66551)"
...
This reverts commit f2ec6d7495 .
2024-03-15 11:33:10 +00:00
Mikhail Glukhikh
09eb138625
Revert "Temporary: don't check log in Maven test (KT-66551)"
...
This reverts commit 95fa065361 .
2024-03-15 11:33:10 +00:00
Mikhail Glukhikh
40c4e865c7
K2/Java/enhancement: implement wildcards replacement with flexible bounds
...
This commit in fact changes two very related places:
- first, it implements forgotten 'enhancedForWarnings' in K2 enhancement
- second, it repeats KT-48515 fix for K2 while enhancing wildcards
#KT-65594 Fixed
Related to KT-48515, KT-63746
2024-03-15 09:40:54 +00:00
Mikhail Glukhikh
5b0cb5c9db
K2/jspecify: reproduce KT-65594
2024-03-15 09:40:53 +00:00
Mikhail Glukhikh
cd20f31810
K2: introduce JavaTypeParameterDefaultRepresentationWithDNN exp. feature
...
#KT-66447 Fixed
2024-03-14 22:39:03 +00:00
Mikhail Glukhikh
95fa065361
Temporary: don't check log in Maven test (KT-66551)
2024-03-13 20:38:45 +00:00
Mikhail Glukhikh
f2ec6d7495
Temporary: comment the last check in JavaUsageTest (KT-66551)
2024-03-13 20:38:45 +00:00
Mikhail Glukhikh
0757247233
Temporary: mute pre-release warnings in Gradle tests (KT-66551)
2024-03-13 20:38:44 +00:00
Mikhail Glukhikh
92cf3e3343
Temporary: make "Pre-release classes were found in dependencies" warning
...
See KT-66551
2024-03-13 20:38:44 +00:00
Mikhail Glukhikh
893e5cac94
Temporary: mute PRE_RELEASE_CLASS in some tests (KT-66551)
2024-03-13 20:38:44 +00:00
Mikhail Glukhikh
a0cb713d19
Temporary: make PRE_RELEASE_CLASS a warning in both K1/K2 (KT-66551)
2024-03-13 20:38:44 +00:00
Mikhail Glukhikh
93a796b635
Temporarily unmute passing test around IS_PRE_RELEASE (related to KT-62063)
...
This test (probably) should be muted again after bootstrapping
2024-03-13 20:38:44 +00:00
Mikhail Glukhikh
f37347ddb7
Temporarily mute failing test around IS_PRE_RELEASE (related to KT-62063)
...
This test should be fixed by bootstrapping or in KT-66551
2024-03-13 20:38:44 +00:00
Mikhail Glukhikh
dc879a3875
K2: drop poisoning flag due to upcoming 2.0.0-RC
...
#KT-62063 Fixed
2024-03-13 20:38:44 +00:00
Mikhail Glukhikh
f656a9fdc6
Migrate some KT-65789 & KT-58920 tests on using take<ExpectedType>(arg)
2024-03-13 14:57:34 +00:00
Mikhail Glukhikh
0f53ee64d6
K2: make qualifier & classifier the same tower level
...
#KT-65789 Fixed
#KT-38031 Fixed
2024-03-13 14:57:34 +00:00
Mikhail Glukhikh
d6e67e43f9
K1/K2: add a test for KT-62866
2024-03-13 14:57:34 +00:00
Mikhail Glukhikh
3b9e08d6b8
K1/K2: reproduce KT-65789
2024-03-13 14:57:33 +00:00
Mikhail Glukhikh
0b34d66b87
Revert "FIR: Report CAPTURED_VAL_INITIALIZATION if initialization is done"
...
This reverts commit 1c4023fda5 .
#KT-64854 Submitted
#KT-59906 Submitted
2024-03-12 15:58:34 +00:00
Mikhail Glukhikh
d897bfbcad
Fix tests after a semantically conflicting merge of KT-50008 and KT-65596
2024-03-12 14:54:10 +00:00
Mikhail Glukhikh
c4bcdc42c1
K2: don't count use-sites of Java type parameter with nullable bounds as not null
2024-03-11 18:05:04 +00:00
Mikhail Glukhikh
d353fd400d
K1/K2: add a test for KT-50008
2024-03-11 18:05:04 +00:00
Mikhail Glukhikh
633e96b966
K1/K2: add test for Future.get case
2024-03-11 13:38:05 +00:00
Mikhail Glukhikh
f597c02327
K1/K2: extend the test for KT-65184 with the case suggested by Simon
2024-03-11 13:38:05 +00:00
Mikhail Glukhikh
60f9206d3b
Fix test data for IR fake override tests
2024-03-11 13:38:05 +00:00
Mikhail Glukhikh
266669272d
Rename/move/mark the test for KT-65184
2024-03-11 13:38:05 +00:00
Mikhail Glukhikh
98e4c64360
K1/K2: add more tests around intellij.vcs.git example
2024-03-11 13:38:05 +00:00
Mikhail Glukhikh
d04625666a
K2: don't approximate captured types in ResultTypeResolver in certain cases
...
To be more precises, ResultTypeResolver for K2 now searches for
similar LOWER/UPPER constraints pair based on the same flexible type,
like LOWER(CapturedType&Any..CapturedType?) and UPPER(CapturedType!).
If such a pair is found, the CapturedType is not approximated.
This is done to avoid a big difference between this case and
completely same constraints, like LOWER(CapturedType!) and
UPPER(CapturedType!). In this case we squash them to EQUAL(CapturedType!)
even before ResultTypeResolver, and captured types which is got from
an EQUAL constraint are not approximated even before this commit.
This commit fixes back a case from KT-50134 and a problem with intellij.vcs.git
#KT-65596 Fixed
2024-03-11 13:38:05 +00:00
Mikhail Glukhikh
c966533d73
K2: reproduce a problem from intellij.vcs.git
2024-03-11 13:38:05 +00:00
Mikhail Glukhikh
e701a16460
Fix of jspecify test data
...
In a1.bar<T?> now we have effectively T! bound instead,
so a diagnostic disappears here
2024-03-11 13:38:05 +00:00
Mikhail Glukhikh
78b6432ced
K2: don't make T = Type! substitutions for constructors, including SAM
...
Without this commit we get some ABI changes and it looks bad.
Related to KT-65596
2024-03-11 13:38:05 +00:00
Mikhail Glukhikh
7fd46f1450
Minor: remove redundant call
2024-03-11 13:38:05 +00:00
Mikhail Glukhikh
16c116908c
Minor: fix typo
2024-03-11 13:38:05 +00:00
Mikhail Glukhikh
65adbeebd9
Minor: drop commented code part
2024-03-11 13:38:05 +00:00
Mikhail Glukhikh
db173b8ac5
K1/K2: add test for Comparator.comparing situation from intellij
2024-03-11 13:38:05 +00:00
Mikhail Glukhikh
993509c057
K1/K2: add test for streams situation from intellij
2024-03-11 13:38:05 +00:00
Mikhail Glukhikh
6e1b6427ab
K1/K2: add a test confirming current behavior of KT-57014 case
2024-03-11 13:38:05 +00:00
Mikhail Glukhikh
c04a8fc3b8
K1/K2: add test cases for KT-53792 and KT-66369
2024-03-07 10:25:11 +00:00
Mikhail Glukhikh
5ea6f20192
K1/K2: add reproducers for KT-66229, KT-66243 and KT-66272
...
As all these issues aren't reproducible in K2, we may count them as fixed.
Related to KT-53478
#KT-66229 Fixed
#KT-66243 Fixed
#KT-66272 Fixed
2024-03-06 09:01:38 +00:00
Mikhail Glukhikh
e8ba534904
K1/K2: add tests confirming behavior of remaining KT-63242 cases
2024-03-05 20:19:02 +00:00
Mikhail Glukhikh
a77a1cf3db
K1/K2: add test confirming correct work of KT-63487 case
2024-03-05 14:51:15 +00:00
Mikhail Glukhikh
584d98cd72
K2: add a BB test confirming work of KT-63588
2024-03-05 11:09:51 +00:00
Mikhail Glukhikh
75ecba5a4a
Tests/PCLA: extend the test for KT-55168
...
#KT-55168 As Designed
2024-03-01 17:02:49 +00:00
Mikhail Glukhikh
09db7dbd22
K2: add tests to confirm current behavior of KT-65679 examples
2024-02-29 10:02:06 +00:00
Mikhail Glukhikh
202c7f4677
K2: cleanup of FirVisibilityChecker.isVisibleForOverriding
2024-02-28 09:00:56 +00:00
Mikhail Glukhikh
678816f9e8
K1: introduce BUILDER_INFERENCE_STUB_PARAMETER_TYPE to prevent compiler crashes
...
This diagnostic is reported in rare situations when
StubTypeForBuilderInference is kept as a parameter type
of for loop or lambda. Before this commit, we had in K1
"Could not load module <error module>" from IrLinker instead.
Related to: KT-52757, KT-53109, KT-63841, KT-64066
#KT-53478 Fixed
2024-02-27 10:25:13 +00:00
Mikhail Glukhikh
91e9fbd9bf
K1: change depr. level of List.getFirst to HIDDEN but don't force it on overrides
...
#KT-65441 Fixed
2024-02-27 08:40:53 +00:00
Mikhail Glukhikh
d870d9dcc6
K1/K2: add tests for KT-65441 current behavior
2024-02-27 08:40:52 +00:00
Mikhail Glukhikh
6ed7c041b4
K1/K2: add various tests for context receiver tower resolve priority
...
Related to KT-64531, KT-64488
#KT-64531 As Designed
2024-02-14 09:55:51 +00:00
Mikhail Glukhikh
8f906ca669
K2: refactor/simplify/comment processOverridesForFunctionsWithDifferentJvmName
2024-02-09 19:04:42 +00:00
Mikhail Glukhikh
a189509353
K2: build override structure for Java renamed builtins more precisely
...
#KT-65410 Fixed
2024-02-09 19:04:42 +00:00
Mikhail Glukhikh
c6f5e5f297
Add Kdoc to processOverridesForFunctionsWithDifferentJvmName
2024-02-09 19:04:42 +00:00
Mikhail Glukhikh
ba374a3978
K2: reproduce KT-65410 in diagnostic/BB tests
2024-02-09 19:04:42 +00:00
Mikhail Glukhikh
e532220305
K1/K2: add a test fixing behavior of overloadResolutionByLambda/PCLA combo
2024-02-09 11:38:34 +00:00
Mikhail Glukhikh
8217aa9633
K2: introduce fun interface PostponedAtomAnalyzer to make code cleaner
2024-02-09 11:38:34 +00:00
Mikhail Glukhikh
9b2fc061e5
K2: drop unused ConeStubTypeForSyntheticFixation
2024-02-09 11:38:34 +00:00
Mikhail Glukhikh
f1aaae9515
K2: reorganize code in ConstraintSystemCompleter around PCLA mode
2024-02-09 11:38:34 +00:00
Mikhail Glukhikh
56475c0a5b
Rename: builderInferenceSession -> pclaInferenceSession
2024-02-09 11:38:34 +00:00
Mikhail Glukhikh
195d3604ae
Add 'K2Only' OptIn for 'usesOuterCs'
2024-02-09 11:38:34 +00:00
Mikhail Glukhikh
e54ed9d470
Cleanup FirPCLAInferenceSession
2024-02-09 11:38:34 +00:00
Mikhail Glukhikh
9743a5b334
K2: drop unused parameter in ConstraintSystemCompleter
2024-02-09 11:38:34 +00:00
Mikhail Glukhikh
f0ac963474
K2/PCLA: add explicit withPCLASession: Boolean parameter to analyzeLambda
2024-02-09 11:38:34 +00:00
Mikhail Glukhikh
c7bc8547da
K2: inline notFixedInputTypeVariables in ConstraintSystemCompleter
2024-02-09 11:38:34 +00:00
Mikhail Glukhikh
5e4c0186ac
Fix exception in checker stage of FirResolveModularizedTotalKotlinTest
...
#KT-65468 Fixed
2024-02-09 09:34:19 +00:00
Mikhail Glukhikh
f3523edb61
Minor cleanup of approximateCapturedType comments/code
2024-02-08 10:49:55 +00:00
Mikhail Glukhikh
44dcae2090
Rename: type -> capturedType
2024-02-08 10:49:55 +00:00
Mikhail Glukhikh
94bcf6d87f
K2: handle recursive types properly in approximation
...
This commit is intended to deal with inconsistency in K1/K2
star projection handling.
K1 star projection includes a 'type' property.
This type from a star projection can be used for relevant
functions / properties return types,
and already includes some approximation for recursive generics.
In contrast, K2 star projection is an object,
and return types of relevant functions / properties are
represented as captured types.
To prevent recursion in them in recursive generic case,
this commit includes additional replacement of their type arguments.
See more details in added comments.
#KT-65057 Fixed
2024-02-08 10:49:55 +00:00
Mikhail Glukhikh
c4d6554493
K2: reproduce KT-65057
2024-02-08 10:49:55 +00:00
Mikhail Glukhikh
8ee54a9045
K2: add a test to ensure #KT-63756 Fixed
2024-02-07 20:56:04 +00:00
Mikhail Glukhikh
78876b32e9
K2: unmute testInnerClassPackageConflict2 thus fixing current K2 behavior
...
Related to KT-63070, KT-60792
2024-02-07 11:36:53 +00:00
Mikhail Glukhikh
e1df52bc02
K2: handle non lookup-tag based types in private-to-this analysis
...
#KT-62134 Fixed
2024-02-02 17:12:02 +00:00
Mikhail Glukhikh
3c3396a87e
K2: reproduce some situations related to KT-62134
2024-02-02 17:12:02 +00:00
Mikhail Glukhikh
36dd9b6818
K2: add BB tests for KT-59380 working properly (compiler error in K1)
...
#KT-59380 As Designed
2024-02-02 17:07:40 +00:00
Mikhail Glukhikh
7615d863d5
K2: add ACCIDENTAL_OVERRIDE_CLASH_BY_JVM_SIGNATURE for clashing functions
...
This diagnostic is reported on an explicitly-declared function which
overrides a regular Java function with the same signature as a hidden
one from the same scope.
#KT-64846 Fixed
2024-01-31 17:06:36 +00:00
Mikhail Glukhikh
8f9614c1fb
K2: don't allow to override isHiddenToOvercomeSignatureClash to match K1
...
Related to KT-64846
2024-01-31 17:06:36 +00:00
Mikhail Glukhikh
3b164e560c
JavaClassUseSiteMemberScope: add KDoc
2024-01-31 17:06:36 +00:00
Mikhail Glukhikh
49ec30735c
K2: add a pair of KJ tests related to KT-64846 but w/out explicit override
2024-01-31 17:06:36 +00:00
Mikhail Glukhikh
c0e0b4d32b
K2/Java: cleanup code around processOverridesForFunctionsWithErasedValueParameter
...
#KT-64846 In Progress
2024-01-31 17:06:36 +00:00
Mikhail Glukhikh
ac729e28da
K2/Java: fix processing of built-in with value parameters to be erased in Java
...
In this commit we started to create and process a hidden copy
for a built-in functions, which value parameters are erased in Java,
in case we have an accidental Java override which value parameters
are not erased.
In this situation attempt to override such a Java override in Kotlin
again will lead to inaccessible functions
(see changes in containsAndOverload.fir.kt)
#KT-64846 In Progress
2024-01-31 17:06:35 +00:00
Mikhail Glukhikh
30ad532ff9
K2/tests: add a similar to containsAndOverload test about charAt / get
...
Related to KT-64846
2024-01-31 17:06:35 +00:00
Mikhail Glukhikh
005cda1f6e
K2/tests: add scope dumping for tests related to KT-64846
2024-01-31 17:06:35 +00:00
Mikhail Glukhikh
d0c78e5116
K2/tests: add /* hidden ... */ rendering to scope dumper
2024-01-31 17:06:35 +00:00
Mikhail Glukhikh
ed246d372b
K2: introduce platform-dependent filtering for non-JVM platforms
...
This commit fixes a false negative in testData/cli/metadata/getOrDefault
Related to KT-57268
2024-01-30 19:44:00 +00:00
Mikhail Glukhikh
7599ff0ef1
K2: add a reproducer for getOrDefault false negative in metadata compilation
...
This case is similar to KT-57268 in early JDKs
2024-01-30 19:44:00 +00:00
Mikhail Glukhikh
38aec7333b
Drop mentioning of KT-63955 in some ABI difference comments
...
In fact, the commit c3926219 should do it before because the relevant
difference was removed in this commit
2024-01-30 19:44:00 +00:00
Mikhail Glukhikh
672b5ba0d7
K2/Java: implement platform-dependent function filtering in JvmMappedScope
...
We drop Kotlin function 'remove' or 'getOrDefault' from JvmMappedScope,
if it has platform-dependent annotation, and the bound Java class scope
does not contain a function with the same signature.
#KT-57268 Fixed
2024-01-30 19:44:00 +00:00
Mikhail Glukhikh
51093a4764
K1/K2: add a group of BB test around primitives in Java
...
Related to KT-62554, KT-63242
2024-01-24 08:39:18 +00:00
Mikhail Glukhikh
e42c1be354
K2: use intersection scope override checker also in intersection scope
...
In more details, we use either platform override checker (if we came
from platform) or the combined intersection scope override checker
at this place. Also this commit fixes various places around
JavaOverrideChecker, allowing to apply it in intersection override
checker properly:
- don't consider return types in this place
- apply JavaOverrideChecker if at least one candidate is from Java
- compare type primitivity closer to K1 logic
#KT-62554 Fixed
Partially fixes KT-63242
2024-01-24 08:39:18 +00:00
Mikhail Glukhikh
54d978ba86
K2: add various tests describing current KT-62554 / KT-63242 behavior
2024-01-24 08:39:18 +00:00
Mikhail Glukhikh
a83d2b7a67
FirJavaElementFinder: return packages with true isValid()
...
#KT-65111 Fixed
2024-01-19 15:52:14 +00:00
Mikhail Glukhikh
ae6aef3a63
K2: reproduce KT-65111
2024-01-19 15:52:14 +00:00
Mikhail Glukhikh
e999e289ee
K2: split EXPLICIT_TYPE_ARGUMENTS_IN_PROPERTY_ACCESS to property/objects
...
Related to KT-64982
2024-01-17 16:51:48 +00:00
Mikhail Glukhikh
4fd73b06e2
FIR: render FirErrorResolvedQualifier properly
2024-01-17 16:51:48 +00:00
Mikhail Glukhikh
581cac3d45
K2: report EXPLICIT_TYPE_ARGUMENTS_... also on resolved qualifiers
...
#KT-64982 Fixed
2024-01-17 16:51:48 +00:00
Mikhail Glukhikh
ee515ec5c4
K2: drop TODO in buildResolvedQualifierForClass
...
#KT-59649 Fixed
2024-01-17 16:51:48 +00:00