Commit Graph

71 Commits

Author SHA1 Message Date
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
Mikhail Glukhikh 6e391854a0 Data flow values refactoring: removed DataFlowValue.kind.isStable, renamed DataFlowValue.isPredictable -> DataFlowValue.isStable 2016-07-28 15:14:48 +03:00
Mikhail Glukhikh 4f7d8e34b0 Data flow values: initializers for local variables are now stored as "bound values" with inherited nullability #KT-6840 Fixed 2016-07-27 16:24:50 +03:00
Mikhail Glukhikh 7090abddcd Data flow values: variable-based are no more compared with taking kind into account 2016-07-27 16:24:46 +03:00
Mikhail Glukhikh f96b9ddbf5 Minor: unused imports in IdentifierInfo 2016-07-27 16:24:41 +03:00
Mikhail Glukhikh 1c9f08e986 Data flow values: STABLE_COMPLEX_EXPRESSION kind is removed, no use cases exist for them 2016-07-27 16:24:32 +03:00
Alexander Udalov 6baf3ae737 Minor, inline LexicalScope.Companion.empty 2016-07-22 11:05:19 +03:00
Alexander Udalov 00f1415ed7 Fix "rewrite at slice LEXICAL_SCOPE" during callable reference resolution
Following the TODO in CallableReferencesResolutionUtils.kt, delete the
suspicious scope and use the new resolution process with the qualifier which
was obtained after the resolution of LHS. However, by default the tower
resolution algorithm also considers each qualifier as a class value as well,
which would be wrong here because resolution of LHS as a "value" happens
earlier in DoubleColonExpressionResolver and with slightly different rules. To
avoid that, do not mix in the "explicit receiver" scope tower processor when
creating processors for callable reference resolution.

Also delete unused functions and classes related to deleted scope, refactor
Scopes.kt

 #KT-8596 Fixed
2016-07-22 11:05:19 +03:00
Mikhail Glukhikh edeef90c4b Minor improvements in DataFlowValue / IdentifierInfo 2016-07-21 21:15:27 +03:00
Mikhail Glukhikh 11f50186fa x?.y != null and x?.call() != null provoke now x != null, a set of tests #KT-2127 Fixed 2016-07-21 21:15:19 +03:00
Mikhail Glukhikh 9001b9bcc0 DataFlowValue & DataFlowValueFactory major refactoring, get rid of DataFlowValue.id : Any?
Instead, DataFlowValue now requires IdentifierInfo implementation to be created
DataFlowValue is compared using IdentifierInfo
2016-07-21 21:15:05 +03:00
Denis Zharkov 3a59e1d222 Support suspending extension functions 2016-07-06 15:25:19 +03:00
Denis Zharkov 30b4dfa65d Minor. Make extension's receiver to be a type parameter and simplify usage 2016-07-06 15:25:19 +03:00
Alexander Udalov b44f060ffa Do not consider fake variables for objects in :: resolution
The main change is in
NewResolutionOldInference.ResolutionKind.CallableReference, where
createVariableProcessor creates a processor which no longer lists objects

 #KT-12322 Fixed
2016-07-04 15:42:35 +03:00
Denis Zharkov 72eb87f5d0 Support inline suspend functions
A lot of additional work was required to support them:
- Suspension points are being identified by two markers
  instead of one pointing to suspend function call
- Approach with replacing return type of suspend function does not work anymore.
  So we decode suspension return type as an argument for begin marker
- It became necessary to perform variables liveness analysis
  (see comment in org.jetbrains.kotlin.codegen.coroutines.CoroutineTransformerMethodVisitor.spillVariables)
2016-06-19 12:50:54 +03:00
Dmitry Petrov 12710bec2f Redeclaration errors for type aliases: type alias vs function. 2016-06-10 10:25:08 +03:00
Denis Zharkov d2bf4cbfa0 Fix reference resolution on suspension calls 2016-06-09 17:57:15 +03:00
Denis Zharkov 2bdaec6eac Refine definition of whether call is suspension point
It's not about all calls to suspend functions, they may called from non-coroutine code
2016-06-08 18:53:16 +03:00