Commit Graph

9578 Commits

Author SHA1 Message Date
Svetlana Isakova c42c2e653b rename hasUnknownTypeParameters -> hasIncompleteTypeParameters 2013-02-08 15:10:43 +04:00
Svetlana Isakova 3014275982 return commit after merge
'Fixed UnsupportedOperationException when a namespace is used in place of an expression.'
2013-02-08 15:10:43 +04:00
Svetlana Isakova d149218e1d refactoring after code review
do not consider error type in parameters of function type as unknown
2013-02-08 15:10:43 +04:00
Svetlana Isakova cc94c45195 returned method equalsOrContainsAsArgument 2013-02-08 15:10:43 +04:00
Svetlana Isakova ff4a9fdab3 rename
ResolveMode enum to {TOP_LEVEL_CALL, NESTED_CALL}
 completeValueArgumentsInference to completeNestedCallsInference
2013-02-08 15:10:43 +04:00
Svetlana Isakova c069eedc9b small fixes after review 2013-02-08 15:10:43 +04:00
Svetlana Isakova 4f028e41be explicitly invoke callExpressionResolver with NO_EXPECTED_TYPE
for inner calls
2013-02-08 15:10:43 +04:00
Svetlana Isakova 27e6dad307 test improved 2013-02-08 15:10:43 +04:00
Svetlana Isakova db91928984 test fixes after refactorings
expected return type for function literal cannot depend on expected type of outer function
2013-02-08 15:10:43 +04:00
Svetlana Isakova ee0628e862 added DEFERRED_COMPUTATION_FOR_CALL
- instead of storing deferredComputationsForArguments in ResolvedCall
store it in BindingContext (in DEFERRED_COMPUTATION_FOR_CALL)
-do not repeat computation for the same argument (cache added)
2013-02-08 15:10:43 +04:00
Svetlana Isakova f5df9d7dbf refactoring: removed unnecessary local variable 2013-02-08 15:10:43 +04:00
Svetlana Isakova fe66161352 rename get*ExtendedTypeInfo -> get*TypeInfoForCall 2013-02-08 15:10:43 +04:00
Svetlana Isakova 33de1c31c5 check resulting type for inner call
while completeValueArgumentsInference
2013-02-08 15:10:42 +04:00
Svetlana Isakova 73816a7ba2 use 'BasicCallResolutionContext.create' instead of 'toCallResolutionContext'
from ResolutionContext
2013-02-08 15:10:42 +04:00
Svetlana Isakova f17139ba1e refactoring: removed unnecessary flag 2013-02-08 15:10:42 +04:00
Svetlana Isakova fe61d51c10 rename replace->create method 2013-02-08 15:10:42 +04:00
Svetlana Isakova d418a16dd8 render not inferred return/parameter type of function literals as ???
instead of DONT_CARE / CANT_INFER
2013-02-08 15:10:42 +04:00
Svetlana Isakova 1a072e816a fixed DiagnosticMessageTest
value arguments order got lost during substitutions
2013-02-08 15:10:42 +04:00
Svetlana Isakova d447c90b13 added tests for function literals faster resolve 2013-02-08 15:10:42 +04:00
Svetlana Isakova 3eee19578a complete inference for inner calls after resolve&inference of outer call finishes
deferredComputationsForArguments stored in ResolvedCallImpl,
'completeValueArgumentsInference' completes inference for inner calls recursively
2013-02-08 15:10:42 +04:00
Svetlana Isakova 0d0441ebd8 do not use bounds containing error types to derive result 2013-02-08 15:10:41 +04:00
Svetlana Isakova d09c5c5e5e save explicitly 'INCOMPLETE_TYPE_INFERENCE' status 2013-02-08 15:10:41 +04:00
Svetlana Isakova 3f466e8aac added 'replaceResolveMode' to CallCandidateResolutionContext 2013-02-08 15:10:41 +04:00
Svetlana Isakova 35696f9ca0 added tracing parameter to ResolvedCallImpl 2013-02-08 15:10:41 +04:00
Svetlana Isakova ab9781b85d extracted class TracingStrategyImpl 2013-02-08 15:10:41 +04:00
Svetlana Isakova 4f5af9ab96 added ResolveMode (NORMAL, INTERNAL) to CallResolutionContext 2013-02-08 15:10:41 +04:00
Svetlana Isakova bb003d2b2f rename ResolveMode to ResolveArgumentsMode 2013-02-08 15:10:41 +04:00
Svetlana Isakova 09e4625931 added TypeInfoForCall containing CallCandidateResolutionContext
(to save context and complete type inference for call later)
2013-02-08 15:10:41 +04:00
Svetlana Isakova 779a79d4d2 removed unused type parameter from CallCandidateResolutionContext 2013-02-08 15:10:41 +04:00
Svetlana Isakova 3ef640039b separated addition of constraints for function literals(*) and for expected type
* = which argument types are known
  call with these function literal constraints is cached
2013-02-08 15:10:41 +04:00
Svetlana Isakova 9b2c666c1f analyze function literals only if argument types are known
(through the first phase of overload resolution)
use intercepting type mismatch trace to backtrace expected type errors
2013-02-08 15:10:41 +04:00
Svetlana Isakova e932b4fa62 moved 'makeTraceInterceptingTypeMismatch' to ExpressionTypingUtils 2013-02-08 15:10:41 +04:00
Svetlana Isakova ecd64e80d8 use CallExpressionResolver directly from ArgumentTypeResolver 2013-02-08 15:10:41 +04:00
Svetlana Isakova 9f28764811 do not repeat initialization of candidate call if the context is copied 2013-02-08 15:10:40 +04:00
Svetlana Isakova e8e07ecec1 contexts moved to subpackage 2013-02-08 15:10:40 +04:00
Svetlana Isakova 0c07cb70ca BasicResolutionContext renamed to BasicCallResolutionContext 2013-02-08 15:10:40 +04:00
Svetlana Isakova dcd358bf3a introduced common supertype for contexts (ResolutionContext) 2013-02-08 15:10:40 +04:00
Svetlana Isakova 2d9f147dbc rename ResolutionContext to CallResolutionContext
introduced ResolutionContext (without call)
2013-02-08 15:10:40 +04:00
Svetlana Isakova 87a6be6749 rename CallResolutionContext to CallCandidateResolutionContext 2013-02-08 15:10:40 +04:00
Svetlana Isakova 97e1f0ba3c added 'namespacesAllowed' flag to ResolutionContext 2013-02-08 15:10:40 +04:00
Svetlana Isakova 5cc6af0f54 moved getStaticNestedClassesScope to DescriptorUtils 2013-02-08 15:10:40 +04:00
Svetlana Isakova 170a3ad718 getQualifiedExpressionTypeInfo moved to CallExpressionResolver
CallExpressionResolver made a component
2013-02-08 15:10:40 +04:00
Svetlana Isakova 664e25d113 added CallExpressionResolver
call expression resolution logic moved there (from BasicExpressionTypingVisitor)
2013-02-08 15:10:40 +04:00
Svetlana Isakova e739fd936e added dataFlowInfo to resolvedCall
(to use it information later without repeating 'getTypeInfo' from cache)
=> getResolvedCallForFunction and getVariableType made static
2013-02-08 15:10:40 +04:00
Svetlana Isakova fa97770831 extracted method commitResolutionCacheData
commit resolve data after argument analysis with temporary trace
2013-02-08 15:10:40 +04:00
Svetlana Isakova ff01fad3cd substitute upper bounds after creating all substitutions for type parameters
(otherwise it doesn't work for forward references)
2013-02-08 15:10:40 +04:00
Svetlana Isakova 8f59172f27 use declared upper bounds in type inference (not just check them)
- simple cases supported
#KT-2856 fixed
2013-02-08 15:10:39 +04:00
Svetlana Isakova 677bc55056 refactoring: changed the order of the parameters 2013-02-08 15:10:39 +04:00
Svetlana Isakova da4f1aec1d KT-422 Tune literal typing rules so that varargs overloaded by primitive types work
#KT-422 fixed
2013-02-08 15:10:39 +04:00
Svetlana Isakova b2823c5966 render type correctly in html for TYPE_INFERENCE_UPPER_BOUND_VIOLATED error 2013-02-08 15:10:39 +04:00