Ilya Muradyan
017f640f26
Allow skipping extensions resolution for implicit receivers
2020-06-19 13:03:23 +02:00
Mikhail Zarechenskiy
df1595e4bc
Fix SAM conversions for derived classes
...
#KT-39535 Fixed
#KT-37149 Fixed
2020-06-18 12:36:30 +03:00
Ilya Muradyan
573c60ed6b
Add missing recordLookup implementations
2020-06-18 09:51:16 +02:00
Victor Petukhov
c0f4ee7dc9
Revert "Add missing definitelyDoesNotContainName methods"
...
This reverts commit b74692e9
2020-06-17 13:16:16 +03:00
Ilya Chernikov
2656eeb164
NI: Optimize some potential hot places
2020-06-16 20:13:58 +03:00
Ilya Chernikov
484d026d2f
Optimize resolution scope queries from the synthetic scopes
...
now required descriptors are queried in advance and passed to the
methods, to avoid multiple same name queries in a row
2020-06-11 16:16:15 +02:00
Ilya Chernikov
3da6ff7ec3
Optimize scopes handling inside LexicalChainedScope
2020-06-11 16:16:14 +02:00
Ilya Muradyan
b74692e96b
Add missing definitelyDoesNotContainName methods
...
Some implementations of definitelyDoesNotContainName method were
missing that led to performance problems during symbols resolution
using TowerResolver.
Relates to KT-39139.
2020-06-11 16:16:13 +02:00
Alexander Udalov
6e67e1e78d
Replace appendln with appendLine in project
2020-06-11 13:01:30 +02:00
Mikhail Zarechenskiy
93e9d3e57d
Delay check for possibly deferred return type for reference candidate
...
This issue appeared after recently added new overload for flatMapTo.
Before that, we picked candidate returning List<T> and completed
inference, now we also check one more flatMapTo, which is here is
incorrect and as a result we go into outer scope. Outer scope contains
one property with deferred type, which introduced error about
"typechecker has run into recursive problem" even it isn't applicable
by receiver.
So, the fix is to check receiver first and only then check return
type of a candidate.
#KT-39470 Fixed
2020-06-09 17:36:58 +03:00
Mikhail Zarechenskiy
22b558110d
Don't apply Unit-conversion for expressions that return Nothing type
2020-06-05 15:59:31 +03:00
Mikhail Zarechenskiy
e72401c5f4
Don't allow coercing receivers from signed to unsigned constants
2020-06-05 13:24:22 +03:00
Mikhail Zarechenskiy
bfa648972f
Introduce call checker for Unit-conversions
2020-06-05 13:24:21 +03:00
Mikhail Zarechenskiy
6b58be377e
Fix chained conversions for subtypes of functional types
2020-06-05 13:24:20 +03:00
Mikhail Zarechenskiy
71cbe97688
Introduce Unit-conversions for simple arguments
2020-06-05 13:24:20 +03:00
Mikhail Zarechenskiy
f08a45f2d4
Refactoring: rename files to avoid "util" suffixes
2020-06-05 13:24:19 +03:00
Mikhail Zarechenskiy
4bd622c1c5
Refactoring: rename method to make it more specific
2020-06-05 13:24:18 +03:00
Mikhail Zarechenskiy
718f23b34f
Compatibility warning for references to companion via name (KT-13934)
2020-06-05 13:24:18 +03:00
Dmitriy Novozhilov
069adebf01
[NI] Fix checking for inline lambdas without candidate
...
#KT-34506
2020-06-01 23:40:32 +03:00
Victor Petukhov
8d05253369
NI: take into account effective variance during adding constraints from LHS instead of only use site variance
...
^KT-39220 Fixed
2020-06-01 17:24:49 +03:00
Mikhail Zarechenskiy
7ec8716d65
Introduce HTML redenred version for compatibility warning
2020-06-01 10:19:36 +03:00
Mikhail Zarechenskiy
569b6eaff2
Don't issue compatibility warning for the candidates in the same group
2020-06-01 10:19:35 +03:00
Mikhail Zarechenskiy
f922e454f9
Don't propagate compatibility resolve from callable reference arguments
2020-06-01 10:19:35 +03:00
Mikhail Zarechenskiy
599f520fd8
Add compatibility warning for chained sam->suspend-conversion
2020-06-01 10:19:35 +03:00
Mikhail Zarechenskiy
a5203428a4
Replace resolution error for suspend-conversion with call checker error
2020-06-01 10:19:34 +03:00
Mikhail Zarechenskiy
eaeaf3c8a3
Add compatibility warning for suspend conversions
2020-06-01 10:19:33 +03:00
Mikhail Zarechenskiy
47e6805186
Add compatibility warning for reference adaptation
2020-06-01 10:19:33 +03:00
Mikhail Zarechenskiy
684dfb959c
Don't write any COERCION_STRATEGY for Unit to Unit return types
2020-06-01 10:19:33 +03:00
Mikhail Zarechenskiy
03358c61d4
Add compatibility warning for SAM conversions
2020-06-01 10:19:33 +03:00
Mikhail Zarechenskiy
01de789c76
Add compatibility warning for SAM conversions on Kotlin functions
2020-06-01 10:19:32 +03:00
Mikhail Zarechenskiy
ea6a8ce5cd
Rename language feature to make it more clear
2020-05-31 18:13:17 +03:00
Victor Petukhov
40a4cea530
NI: remove type depth check during adding initial constraints
2020-05-29 12:37:27 +03:00
Dmitriy Novozhilov
1982f80bfb
[NI] Leave candidates with annotation if there are no candidates without it
2020-05-29 09:36:33 +03:00
Dmitriy Novozhilov
2812ed0a02
[NI] Use types and systems from return arguments instead of return type of lambda
2020-05-29 09:36:33 +03:00
Dmitriy Novozhilov
f76b57d260
[OI] Prefer candidate without @OverloadResolutionByLambdaReturnType
2020-05-29 09:36:33 +03:00
Dmitriy Novozhilov
a604404bff
[NI] Report warning if candidate was chosen using only @OverloadResolutionByLambdaReturnType
2020-05-29 09:36:33 +03:00
Ilya Gorbunov
e9ef6dbc28
Discriminate OverloadResolutionByLambdaReturnType annotated overloads...
...
instead of preferring them in case of unsolvable ambiguity.
2020-05-29 09:36:32 +03:00
Dmitriy Novozhilov
e1418a5540
[NI] Check for maximally specific candidate chosen with factory resolution
2020-05-29 09:36:32 +03:00
Dmitriy Novozhilov
e7869bd9d4
[NI] Analyse lambda in factory pattern resolution in independent context
2020-05-29 09:36:32 +03:00
Ilya Gorbunov
a0c7bece93
Overload resolution by lambda return type
...
Make compiler recognize new annotation enabling this feature.
Change overload selection algorithm to consider all overloads
with that annotation, not just the first one.
#KT-38480
#KT-11265
2020-05-29 09:36:32 +03:00
Dmitriy Novozhilov
1c32c62a87
[NI] Choose annotated candidate if call still ambiguous
...
#KT-11265
2020-05-29 09:36:31 +03:00
Dmitriy Novozhilov
8c524769b1
[NI] Add required FactoryPattern annotation for factory pattern resolve
...
#KT-11265
2020-05-29 09:36:31 +03:00
Dmitriy Novozhilov
865ddac07a
[NI] Add feature for choosing candidate by lambda return type
2020-05-29 09:36:31 +03:00
Victor Petukhov
e72f7d9a1d
NI: return optimization for adding constraints in ConstraintInjector.kt
2020-05-28 14:58:15 +03:00
Victor Petukhov
cadc5ad587
NI: remove deprecated TODO about doing investigation around producing unwanted Any? during incorporation (KT-39154)
2020-05-27 16:52:55 +03:00
Victor Petukhov
0bed055fca
NI: small refactoring around TypeCheckerContext and adding new possible constraints
2020-05-27 16:39:31 +03:00
Victor Petukhov
d7f52e8b67
NI: do explicit incorporation of type of fixing type variable into other constraints
...
^KT-37380 Fixed
2020-05-27 15:44:03 +03:00
Mikhail Zarechenskiy
4dbd4a56d5
Compose: adapt new API for intercepting candidates in call resolvers
...
Most part is made by @lelandrichardson
2020-05-27 01:42:48 +03:00
Victor Petukhov
e70242f6f1
NI: some review fixes for improved postponed arguments analysis
2020-05-25 19:37:30 +03:00
Mikhail Zarechenskiy
2cee82a348
[NI] Resolve receiver of provideDelegate independently
...
#KT-38259 Fixed
2020-05-25 16:06:55 +03:00