Commit Graph

370 Commits

Author SHA1 Message Date
Valentin Kipyatkov f85de3aac7 Added better way to construct FuzzyType 2016-04-05 19:33:05 +03:00
Valentin Kipyatkov 24764ed865 Checking for conflicting substitutors in completion after "by" 2016-04-05 19:33:04 +03:00
Valentin Kipyatkov 7b4f26d1b5 Minor changes on code review 2016-04-05 19:33:00 +03:00
Valentin Kipyatkov 6fa230311c Show substituted type arguments for type instantiation items 2016-04-05 19:32:57 +03:00
Valentin Kipyatkov ba6accd5f9 Correct substitutions for smart completion after "by" and "in" 2016-04-05 19:32:55 +03:00
Valentin Kipyatkov 40e69318b8 Renames + parameter to receiver 2016-03-30 15:58:08 +03:00
Pavel V. Talanov c7cb596f74 Rename: NameShortness -> ClassifierNamePolicy 2016-02-26 14:45:05 +03:00
Stanislav Erokhin f130de2468 Remove scope from Qualifier 2016-02-24 19:33:10 +03:00
Stanislav Erokhin 8c5339cccf Minor. Remove class ClassifierQualifier and create special ClassValueReceiver 2016-02-24 19:33:09 +03:00
Stanislav Erokhin 1ef4a958fd Minor. removed call checked from ResolutionContext. 2016-02-24 19:33:07 +03:00
Valentin Kipyatkov ce8e2d7a65 Added better diagnostic for EA-75805 2016-02-05 16:29:58 +03:00
Ilya Gorbunov 744a7a83f7 Cleanup RC deprecations in compiler and plugin. 2016-01-27 18:34:30 +03:00
Dmitry Petrov 9db3440e72 Fix type inference issues for 'if' and 'when'.
Use 'expectedType' (when present) as an explicit type argument for a special construct call.
Unfortunately, this approach can't be used for elvis due to other elvis-related inference hacks.
Fixes KT-10807, KT-10811.
This also affects KT-6189: now we can infer proper type for 'if'.

If type inference for special call failed, and we found no type errors in sub-expressions,
report TYPE_INFERENCE_FAILED_ON_SPECIAL_CONSTRUCT error.
This (and the hack above) fixes KT-10809: code no longer compiles.
2016-01-27 17:07:20 +03:00
Stanislav Erokhin f710ba88f8 Minor. Removed TypeParameterDescriptor#getLowerBounds 2016-01-22 22:09:33 +03:00
Dmitry Petrov 55b7e4bbf0 Ignore special resolved calls for 'when' in PSI unifier. 2016-01-22 10:41:56 +03:00
Nikolay Krasko 10648f44ac Do not auto-import convention methods without 'operator' modifier (KT-10212)
#KT-10212 Fixed
2016-01-21 17:45:51 +03:00
Valentin Kipyatkov a1d760fc36 KT-10631 Consider creating a synthetic property even when the setter returns 'this'
#KT-10631 Fixed
2016-01-19 15:57:20 +03:00
Valentin Kipyatkov 5a079defc7 "Rename on import" hides importing of the same symbol by other imports with the original name 2016-01-14 17:05:28 +03:00
Alexey Sedunov 1d9bafe196 PSI Unifier: Fix matching of this-expressions
#KT-8293 Fixed
2016-01-14 13:55:10 +03:00
Mikhail Zarechenskiy 29af6586f2 Get rid of ContainerUtil usages in ide-common 2016-01-14 12:06:52 +03:00
Mikhail Zarechenskiy dd11fa9320 Move logic related to expression occurrence searching to ide-common 2016-01-14 12:06:50 +03:00
Mikhail Zarechenskiy bd57096b66 Move AnalyzerUtil to ide-common 2016-01-14 12:06:49 +03:00
Mikhail Zarechenskiy bde556fc10 Move QuickFixUtil to ide-common 2016-01-14 12:06:47 +03:00
Mikhail Zarechenskiy 85b4f5d593 Move part of resolutionApi to ide-common 2016-01-14 12:06:45 +03:00
Mikhail Zarechenskiy 1523586717 Extract interface out from KotlinCacheService to provide separate implementation in Eclipse plugin 2016-01-14 12:06:44 +03:00
Dmitry Jemerov 43a6e13f4b idea: cleanup 'public', property access syntax 2016-01-07 18:12:36 +01:00
Ilya Gorbunov bce9514739 Cleanup in idea plugin modules, ide-common 2015-12-29 18:04:19 +03:00
Michael Bogdanov e671d05105 Companion public val annotated with @JvmFIeld or const 2015-12-29 16:45:23 +03:00
Stanislav Erokhin fe9cbd982d Extract SyntheticScopes to injection component 2015-12-18 22:49:23 +03:00
Stanislav Erokhin c725ed47f5 Replaced ReceiverValue.NO_RECEIVER to null. 2015-12-15 23:09:20 +03:00
Denis Zharkov 871fe7680b Load special override as HIDDEN in case of signature clash
#KT-10151 Fixed
2015-12-11 22:41:03 +03:00
Denis Zharkov 45c0bc3610 Add 'subClassDescriptor' parameter to ExternalOverridabilityCondition 2015-12-11 22:41:03 +03:00
Dmitry Jemerov 009e3f9cd7 rename PSI classes according to current terminology:
KtMultiDeclaration(Entry) -> KtDestructuringDeclaration(Entry)
KtFunctionLiteralExpression -> KtLambdaExpression
KtFunctionLiteralArgument -> KtLambdaArgument
KtDelegationSpecifierList -> KtSuperTypeList
KtDelegationSpecifier -> KtSuperTypeListEntry
KtDelegatorToSuperClass -> KtSuperTypeEntry
KtDelegatorToSuperCall -> KtSuperTypeCallEntry
KtDelegationByExpressionSpecifier ->KtDelegatedSuperTypeEntry
2015-12-10 16:15:13 +01:00
Yan Zhulanow 46ac3571d5 Fix "infix modifier required" errors in project 2015-11-27 15:51:11 +03:00
Ilya Gorbunov 32151c077e Replace map { ... }.filterNotNull() with mapNotNull { ... } 2015-11-21 00:54:01 +03:00
Pavel V. Talanov 6bb89021dd Rename: KtClassInitializer -> KtAnonymousInitializer 2015-11-19 22:57:05 +03:00
Alexander Udalov 3e27fdb964 Inline and move out utilities from ConstraintSystem 2015-11-18 16:40:49 +03:00
Alexander Udalov d4664af4e5 Get rid of originalToVariableSubstitutor and descriptorToVariable
Move the composite substitutor to GenericCandidateResolver where it was used,
other places don't need it since they know the exact call (or NO_CALL), the
substitutor for which should be used
2015-11-18 16:40:48 +03:00
Alexander Udalov 178ca3daae Add call to type variable and mapping descriptor -> variable
Since type parameter descriptor represents a single declaration of a type
parameter, multiple variables in one system may correspond to one type
parameter (e.g. in case of nested calls). Hence it's not possible to map type
parameters uniquely onto type variables and additional information is required
2015-11-18 16:40:47 +03:00
Alexander Udalov 27ce61a3be Always alpha-convert non-external type parameters before registering in system 2015-11-18 16:40:45 +03:00
Alexander Udalov 13abc265ad First steps to make distinction between variables and descriptors in ConstraintSystem
A type variable is an entity, the value of which should be solved by the
system; a descriptor is an actual TypeParameterDescriptor declaration
2015-11-18 16:40:43 +03:00
Alexander Udalov 89dfd52363 Remove ConstraintSystem.partialSubstitutor, move logic to FuzzyType 2015-11-18 16:40:42 +03:00
Alexander Udalov d72a4c8037 Cleanup constraint system, convert functions to properties, delete unused 2015-11-18 16:40:41 +03:00
Alexander Udalov 265c135e89 Rename ConstraintSystemImpl -> ConstraintSystemBuilderImpl 2015-11-18 16:40:40 +03:00
Alexander Udalov bb918a2742 Move mutating methods of ConstraintSystem to Builder
Extract immutable ConstraintSystemSnapshot from ConstraintSystemImpl
2015-11-18 16:40:39 +03:00
Alexander Udalov 393852bf70 Simplify signature of ConstraintSystem#registerTypeVariables
Drop unused variance from TypeBounds and ConstraintSystem, provide default
values, inline methods used only once
2015-11-18 16:40:37 +03:00
Dmitry Petrov 99b411c8ca companionObjectType --> classValueType
(NB: it IS NOT a companion object in case of OBJECT or ENUM_ENTRY)
Unify related names.
2015-11-18 16:27:26 +03:00
Dmitry Petrov ba8372cc11 Fixes for IDE tests after qualifier modifications:
- CallType should look into QUALIFIER,
 so that completion works for (companion) object qualifiers.
- Record type and reference target for object qualifiers (not only for companions).
- "Create (function/...)" should understand ClassQualifier as possible receiver.
- Cleanup after rebase on master.
2015-11-18 14:35:54 +03:00
Mikhail Glukhikh 59e54d1db1 Rename: ThisReceiver ---> ImplicitReceiver 2015-11-17 13:02:16 +03:00
Mikhail Glukhikh 7ba297db81 ThisReceiver converted to Kotlin 2015-11-17 13:02:12 +03:00