Commit Graph

11720 Commits

Author SHA1 Message Date
Svetlana Isakova cf85e4de36 refactoring: moved methods 2013-09-03 13:09:14 +04:00
Svetlana Isakova 5f029c4c57 small refactoring 2013-09-03 13:09:14 +04:00
Svetlana Isakova 0084b68176 analyze incomplete 'in' expression 2013-09-03 13:09:14 +04:00
Svetlana Isakova da07d60ad6 checked for 'isBinaryExpressionDependentOnExpectedType'
both in analyzing expressions & completion phase
2013-09-03 13:09:13 +04:00
Svetlana Isakova cf22bc7c35 added checkType of TypeInfo method 2013-09-03 13:09:13 +04:00
Svetlana Isakova 70b11f6d39 refactoring: extracted methods for visiting special binary expressions 2013-09-03 13:09:13 +04:00
Svetlana Isakova 8b27c72736 removed UNKNOWN_EXPECTED_TYPE
it's NO_EXPECTED_TYPE + ContextDependency.DEPENDENT
2013-09-03 13:09:12 +04:00
Svetlana Isakova 92611e1460 used usual trace instead of dummy one in tests
is necessary for 'if' tests
2013-09-03 13:09:12 +04:00
Svetlana Isakova 58158ab30b ++wrap if branches in blocks 2013-09-03 13:09:12 +04:00
Svetlana Isakova a493125a75 refactoring: fixes after review
rename, removed unnecessary methods, improved test
2013-09-03 13:09:11 +04:00
Svetlana Isakova ae086d883f fixed test after changed type inference error message
changed order or 'found' and 'required' types
2013-09-03 13:09:11 +04:00
Svetlana Isakova fa9959cdb5 refactoring: extracted all diagnostic messages to 'diagnostics' list
fixed test after messages order changed
2013-09-03 13:09:11 +04:00
Svetlana Isakova 928133b69b small fixes after review 2013-09-03 13:09:10 +04:00
Svetlana Isakova 164da12518 LabelResolver moved to ResolutionContext
(from ExpressionTypingContext)
2013-09-03 13:09:10 +04:00
Svetlana Isakova fd5a2056c1 analyze labeled function literals as usual ones
(specially as function literals, not as other expressions)
2013-09-03 13:09:10 +04:00
Svetlana Isakova 8f29968183 test data updated
arguments analyzed even if there's type inference error
2013-09-03 13:09:09 +04:00
Svetlana Isakova 9093d4c373 wrap if branches in blocks 2013-09-03 13:09:09 +04:00
Svetlana Isakova 1861a335f6 always analyze 'if' as a call
not only if it's analyzed as an argument
2013-09-03 13:09:09 +04:00
Svetlana Isakova 5af15d607d removed obsolete use of temporary trace 2013-09-03 13:09:08 +04:00
Svetlana Isakova a6162cf5ba fixed: dataFlowInfoForArguments was not set in call candidate context 2013-09-03 13:09:08 +04:00
Svetlana Isakova 52848f6aa4 Use temporary cache when resolve function literals twice 2013-09-03 13:09:08 +04:00
Svetlana Isakova 7fce75bc1f removed unnecessary parameter
resolve argument without temporary trace
(it's resolved and put to call trace in the beginning anyway)
2013-09-03 13:09:08 +04:00
Svetlana Isakova 30b0a72c6b analyze all arguments with unknown expected type
in the beginning of call resolution process
2013-09-03 13:09:07 +04:00
Svetlana Isakova c8fc2c882d refactoring: extracted method 'getTypeOfLastExpressionInBlock' 2013-09-03 13:09:07 +04:00
Svetlana Isakova 33ab7a3789 added UNIT_EXPECTED_TYPE
use it for coercion to unit instead of repeating analysis twice
2013-09-03 13:09:07 +04:00
Svetlana Isakova 756cb3759b fixed: use function placeholder when there is no declared value parameter list
(not when there is no value parameters)
2013-09-03 13:09:06 +04:00
Svetlana Isakova 358c1d6f71 fixed ArrayIndexOutOfBoundsException in quick fix util
(in 'getParameterCorrespondingToValueArgumentPassedInCall')
2013-09-03 13:09:06 +04:00
Svetlana Isakova 623c6e50e1 removed unused method 2013-09-03 13:09:06 +04:00
Svetlana Isakova dc51a2d238 analyze a lot of expressions in independent of context (expected type) mode 2013-09-03 13:09:05 +04:00
Svetlana Isakova fbd94a9507 rename ResolveMode to ContextDependency 2013-09-03 13:09:05 +04:00
Svetlana Isakova d26806a5ed update number value type properly 2013-09-03 13:09:04 +04:00
Svetlana Isakova 46b099c858 added deparenthesizeBinaryExpressionWithTypeRHS
param to deparenthesize
2013-09-03 13:09:04 +04:00
Svetlana Isakova c0f7a82b15 fixed result type for elvis operator
return type for special call for elvis operator might be nullable
but result is not nullable if the right type is not nullable
2013-09-03 13:09:04 +04:00
Svetlana Isakova 656597e0e2 removed obsolete code
selector of qualified expression can't be qualified expression itself
2013-09-03 13:09:04 +04:00
Svetlana Isakova 6429239f3f rewrote analyzing expression with type rhs
removed unnecessary temporary trace (and so extra 'getType' for left expression)
2013-09-03 13:09:03 +04:00
Svetlana Isakova 4caeadc0c1 added TemporaryResolutionResultsCache
to use cache when temporary traces are used
2013-09-03 13:09:03 +04:00
Svetlana Isakova ead5219001 assert added 2013-09-03 13:09:03 +04:00
Svetlana Isakova 7a757d2a51 changed type parameter name to special
when resolve special construction as a call
2013-09-03 13:09:02 +04:00
Svetlana Isakova 7b04755a59 through completion phase result type of call should be updated
with respect to being selector in safe call expression
2013-09-03 13:09:02 +04:00
Svetlana Isakova 4621fe6dfa resolve elvis operator as call 2013-09-03 13:09:02 +04:00
Svetlana Isakova 624eaa5aa8 refactoring: extracted 'visitElvisExpression' 2013-09-02 23:18:46 +04:00
Svetlana Isakova aba70e047d resolve a!! as call 2013-09-02 23:18:46 +04:00
Svetlana Isakova 46cb6b3242 complete resolve for array access expression 2013-09-02 23:18:45 +04:00
Svetlana Isakova 051055896d update recorded EXPRESSION_TYPE of call expression
after type parameter inference completion
2013-09-02 23:18:45 +04:00
Svetlana Isakova e2f681c587 report type mismatch deeply on branches for if
in type argument inference case
2013-09-02 23:18:45 +04:00
Svetlana Isakova c5b6ee4df3 added 'commonSupertypeForPossiblyNumberTypes' 2013-09-02 23:18:45 +04:00
Svetlana Isakova e4325cd92d resolve argument of 'if' call
with right data flow info
2013-09-02 23:18:45 +04:00
Svetlana Isakova e37af4de67 added DataFlowInfoForArguments param to contexts 2013-09-02 23:18:45 +04:00
Svetlana Isakova 99bb6f13b5 data flow info for arg may affect next argument's type for type argument inference case 2013-09-02 23:18:45 +04:00
Svetlana Isakova 9ccd1e5ddd added DataFlowInfoForArguments
data flow info for argument depends on previous argument analysis
special interface was added to support case with argument types inference
and 'if' (with special data flow info for then and else arguments)
2013-09-02 23:18:45 +04:00