Commit Graph

88 Commits

Author SHA1 Message Date
Dmitry Petrov 954204da82 KT-1560
Report warning on extensions shadowed by members.
2017-01-16 17:25:13 +03:00
Denis Zharkov 8475869fb3 Support common calls on suspend function typed values
Also support multiple value parameters in suspend function type

 #KT-15379 Fixed
 #KT-15380 Fixed
2016-12-22 11:15:52 +03:00
Stanislav Erokhin 04fddc7139 Discriminate header classes in member scope.
We made it because of non-stable name resolution when project is multi platform. For such projects in platform module we have two classifiers with the same name, but impl class or type alias should win!
2016-12-19 22:43:10 +03:00
Mikhael Bogdanov 547704c179 'SubpackagesImportingScope' class update due to new diagnostic 2016-12-16 13:17:29 +01:00
Dmitry Petrov 8e3fd0efc3 If the last argument of a function is a suspend function,
suggest trailing lambda variant in completion.
2016-12-15 23:58:14 +03:00
Stanislav Erokhin 42440f50dc Remove soft keyword coroutine & isCoroutine from ValueParameterDescriptor. 2016-12-15 23:57:56 +03:00
Denis Zharkov 66c2333eb5 Drop checks related to 'coroutine' modifier 2016-12-15 23:32:10 +03:00
Denis Zharkov b1d1128466 Minor. Move createFunctionType to core
As it will be used in the type mapper soon
2016-12-15 23:32:09 +03:00
Stanislav Erokhin 457918a6dd Changed name resolution for dynamic extension. Added annotation DynamicExtension. 2016-12-14 21:36:26 +03:00
Stanislav Erokhin 59efedf610 Rename platform to header. 2016-12-13 18:00:00 +03:00
Alexander Udalov d5c75ae764 Minor refactoring in frontend/resolution
Fix typos, formatting, diagnostic message
2016-12-08 12:20:37 +03:00
Denis Zharkov dd392963ac Minor. Rename SyntheticExtensionFunctions -> SyntheticMemberFunctions 2016-12-07 21:04:57 +03:00
Denis Zharkov 891a036b59 Change resolution priority level for SAM adapters
After this change SAM adapters are being resolved in the same group
as members, thus their overload resolution happens simultaneously.

But in the case of overload resolution ambiguity try to filter out all
synthetic members and run the process again.

See the issue and new test for clarification

 #KT-11128 In Progress
2016-12-07 21:04:44 +03:00
Denis Zharkov 83056c71c9 Minor. Extract FlatSignature factory 2016-12-07 21:04:08 +03:00
Denis Zharkov c45edaa420 Minor. Extract CandidatesCollector as a type alias 2016-12-07 21:04:08 +03:00
Denis Zharkov a34c9c2580 Support new suspend convention in frontend
#KT-14924 In Progress
2016-11-29 14:14:50 +03:00
Alexander Udalov a3cfd3962c Discriminate 'platform' declarations in resolution
Otherwise calls to functions which are declared twice (platform and impl) would
result in an error "conflicting overloads" in platform-specific modules
2016-11-25 20:50:24 +03:00
Dmitry Petrov d665193c20 Type alias constructors for inner classes in expressions ans supertype lists. 2016-11-21 10:25:51 +03:00
Denis Zharkov 24819a079b Change resolution scope for componentX in lambda parameters
Component-functions are resolved in the same scope as the first statement of the lambda, but lambda receiver was not available

 #KT-14692 Fixed
2016-11-10 10:33:42 +03:00
Valentin Kipyatkov 8cd35f67fd More correct implementation of addImportingScopes 2016-11-08 12:51:34 +03:00
Denis Zharkov b8e8206c4f Minor. Remove redundant parameter
LexicalWritableScope.implicitReceiver is always null for all constructor's usages
2016-11-01 15:58:14 +03:00
Denis Zharkov 48c33333ee Do not add special names to scopes even partially
See 7a41d13b41
It's may be dangerous to call `addDescriptor` and then
not to add descriptor into the variablesAndClassifiersByName map
2016-10-14 15:50:31 +03:00
Mikhail Glukhikh 7a41d13b41 Do not add special names to scopes #KT-14319 Fixed 2016-10-13 17:17:05 +03:00
Valentin Kipyatkov 7b12dd498f KT-13780 No completion and assertion error in log
#KT-13780 Fixed
2016-10-13 15:10:53 +03:00
Valentin Kipyatkov 59269ef1ae ParameterName annotation on type argument used to hold parameter name 2016-10-11 23:38:51 +03:00
Valentin Kipyatkov 6527ada775 Changes on code review 2016-10-11 23:38:50 +03:00
Valentin Kipyatkov d8759fcbcc Optimizations 2016-10-11 23:38:50 +03:00
Valentin Kipyatkov 147d1da1ed Supported obtaining function type parameter names from KotlinType 2016-10-11 23:38:48 +03:00
Alexander Udalov 610c549225 Filter out equivalent calls before reporting "none applicable"
If a module is configured in such a way that the same function appears multiple
times via different dependencies, it's not helpful to report "none of the
following functions can be called", listing the same function multiple times
2016-10-02 21:03:30 +03:00
Denis Zharkov 567b0cc8ea Add a couple of covariant necessary overrides
They become unavoidable after checking override conflicts
for delegation members
2016-09-28 11:40:20 +03:00
Dmitry Petrov 07198cf86d SAM constructors for type aliases. 2016-09-22 10:38:34 +03:00
Dmitry Petrov dac9d8b845 Additional checks for type alias constructors. 2016-09-20 10:55:36 +03:00
Dmitry Petrov b31ab729de Containing declaration for TypeAliasConstructorDescriptor
is a corresponding TypeAliasDescriptor.
2016-09-20 10:55:36 +03:00
Dmitry Petrov 34240e2ff9 Create special descriptor for an object corresponding to type alias. 2016-09-16 15:44:44 +03:00
Stanislav Erokhin 9fa6fb213b Potential fix for some random errors about "cannot choose between equals invoke functions". 2016-09-01 18:01:56 +03:00
Stanislav Erokhin bebc75c8ef Set reference target and report custom error instead unresolved reference for cases: interface, generic parameter, object + invoke, class without companion.
#KT-2787 Fixed.
2016-09-01 18:01:55 +03:00
Stanislav Erokhin eb6f444c19 Minor. rename context -> candidateFactory 2016-09-01 18:00:23 +03:00
Stanislav Erokhin 0072d6004a Refactoring: rename TowerContext to CandidatesFactory, InvokeTowerContext to CandidateFactoryProviderForInvoke. 2016-09-01 18:00:22 +03:00
Stanislav Erokhin c910646eda Refactoring: remove name from ScopeTower. 2016-09-01 18:00:21 +03:00
Stanislav Erokhin aa5be2ec7b Refactoring remove scopeTower from TowerContext. 2016-09-01 18:00:21 +03:00
Stanislav Erokhin ddb75abe30 Rename ScopeTower to ImplicitScopeTower. 2016-09-01 18:00:20 +03:00
Stanislav Erokhin 0c60cda22a Refactoring: replace ReceiverValue to ReceiverValueWithSmartCastInfo, Receiver to DetailedReceiver 2016-09-01 18:00:20 +03:00
Stanislav Erokhin d4a2cad35c Refactoring move DataFlowValue back to frontend module. 2016-09-01 18:00:19 +03:00
Stanislav Erokhin 58fd24943d Refactor DataFlowDecorator. 2016-09-01 18:00:18 +03:00
Stanislav Erokhin ca6c6ae0f3 Refactoring. Move creation of functionProcessor into resolution module. 2016-09-01 18:00:17 +03:00
Stanislav Erokhin 0cf7490500 Moved OverloadingConflictResolver into resolution module. 2016-08-24 11:11:45 +03:00
Mikhail Glukhikh 35446037bb UNINITIALIZED_ENUM_ENTRY compiler warning introduced #KT-2349 Fixed
(cherry picked from commit 76ac6d1)
2016-08-08 17:47:56 +03:00
Mikhail Glukhikh b7ed68db05 CFA: No more UNRESOLVED_CALL for object / enum entry qualifiers
(cherry picked from commit 4b09de8)
2016-08-08 17:47:40 +03:00
Stanislav Erokhin 19e4dbc37c Refactoring. Move functionTypeResolveUtils.kt to resolution module. 2016-07-29 17:53:11 +03:00
Stanislav Erokhin df461d6e7f Refactoring. Remove supertype TowerContext from class InvokeTowerContext. 2016-07-29 17:53:11 +03:00