Commit Graph

12 Commits

Author SHA1 Message Date
Dmitry Savvinov 8fcd98639d Minor: merge HierarchicalExpectActualMatchingTests into MultiplatformHighlightingTests 2020-03-05 17:27:19 +03:00
Ilya Chernikov 6356807997 Reapply "Only create descriptors for candidates with lambda args"
#KT-36247 fixed
A lot of testdata changed because significanly less (error) descriptors
are created for unresolved types, so diagnostics became different.
2020-02-14 11:41:30 +01:00
Pavel Kirpichenkov 572dee6835 Revert "Only create descriptors for candidates with lambda args"
This reverts commits:
349d07ad43
2249c223fe

Revert due to differences in test data with NI enabled
^KT-36247 Open
2020-02-12 20:52:30 +03:00
Ilya Chernikov 349d07ad43 [minor] Fix testdata after commit "Only create descriptors for candidate"... 2020-02-11 11:20:05 +01:00
Ilya Chernikov 2249c223fe Only create descriptors for candidates with lambda args
#KT-36247 fixed
2020-02-10 14:21:02 +01:00
Denis Zharkov f91db5f0b8 Restore correct overloads ambiguity accidentally removed in 1.3.60
This problem is only relevant when isTypeRefinementEnabled == true (HMPP projects)

Ambiguity accidentally was removed after 471134d
There, for areCallableDescriptorsEquivalent we stopped assuming
as impossible a situation of having identity-different descriptors
in the same containing declaraton that still might be considered equal

So, before 471134d we were comparing
"fun foo(x: String)" with "[substituted] fun foo(x: String)"
and areCallableDescriptorsEquivalent returned false for such case.
Thus, both overrides were left in the resulting set.

After 471134d, those two descriptors
becamed considered as equal thus having a possibility to remove any of them.

The problem is that "areCallableDescriptorsEquivalent" has kind of
unclear contract. Effectively it checks whether two descriptors match
to the same declaration.

But some of the usages expect that it also makes sure that descriptors
have the same substitution (see org.jetbrains.kotlin.resolve.calls.smartcasts.IdentifierInfo.Variable#equals)

So, the straight solution is using original descriptors for the cases
where we need to make sure that descriptors relates to actually different
declarations

^KT-34027 Fixed
2019-09-30 20:09:42 +03:00
Dmitry Savvinov 9290ec34db Provide proper platformSpecficContainer in CompositePlatformConfigurator
Now, call 'configureDefaultCheckers' and 'configureExtensionsAndCheckers'
from all childs configurators, instead of taking just container from
CommonPlatformAnalyzerServices

This is needed because some IDE services tend to re-create containers
(in particular, PerFileAnalysisCache and ResolveElementCache do that to
re-inject new trace) and use usual injection DSL, which, in particular,
takes 'platformSpecificContainer'.

Returning 'common'-conatiner leads to losing all platform-specific checkers.
On the other hand, calling exactly 'configureDefaultCheckers' +
'configureExtensionsAndCheckers' should be correct, because that's how
single-platform 'platformSpecificContainer' is composed (see
PlatformConfiguratorBase), and in 'createContainerForCompositePlatform'
we don't use 'platformSpecificContainer' anyways

^KT-23305 Fixed
2019-08-13 12:12:29 +03:00
Dmitry Savvinov 6177b3e8dc Minor. Add empty file to previously empty directory in test
Otherwise Git doesn't commit empty folder into repository and test fails
later with "invalid directory exception"
2019-07-30 14:19:02 +03:00
Dmitry Savvinov ddb685a8f9 Add test on nonMPP -> MPP dependency 2019-07-30 12:41:41 +03:00
Dmitry Savvinov 79313037d1 Minor. Merge multiplatformTypeRefinement testdata with multiplatform testdata 2019-07-30 12:41:41 +03:00
Dmitry Savvinov b103f42ca8 Add test on using correct builtins in MPP
Note that Native built-ins are not resolved correctly in this module
(CPointed and similar). This is not a bug, but rather a technical
limitation of the current testing infrastructure: we can't depend on
kotlin-native stdlib in "big-Kotlin" repo, and native stdlib is used as
the only one source of Native built-ins.
2019-07-30 12:41:41 +03:00
Dmitry Savvinov c50eeb3edb Add few tests on internal visibility in MPP 2019-07-30 12:41:40 +03:00