Svetlana Isakova
79cec6411d
Mark only unreachable parts of element if it has reachable parts
...
like for 'return todo()' mark only 'return'
2014-06-21 12:26:33 +04:00
Andrey Breslav
851fbbc937
Test data fixed
2014-06-19 22:10:50 +04:00
Svetlana Isakova
928b28e080
Complete type inference for nested calls
...
inside non resolved invocation
2014-04-30 13:34:31 +04:00
Svetlana Isakova
4657a4b271
fixed bug in renderer for violated upper bound error
2013-12-27 16:02:16 +04:00
Svetlana Isakova
dd6940be41
added CHECK_TYPE directive to diagnostic tests
2013-12-19 13:01:05 +04:00
Svetlana Isakova
46b77f4472
don't report unnecessary smart cast on receiver
2013-12-11 19:53:50 +04:00
Svetlana Isakova
c30259dfbe
added info about smart casts to diagnostic tests
2013-12-11 19:53:50 +04:00
Andrey Breslav
11fcd64949
Mark expressions for correct recognition by "unreachable code"
2013-12-05 13:02:17 +04:00
Mikhael Bogdanov
d11311ec20
Test compilation fix
2013-12-02 18:30:42 +04:00
svtk
1a34dffb1f
Fixed inference in a simple case.
...
Try number lower bounds before upper bounds when computing a value.
2013-11-22 18:58:01 +04:00
svtk
ca1650d31d
Fixed exception from EA
...
"The constraint shouldn't contain different type variables on both sides: T <: R".
It occurred because we analyzed function literals before completion with unsubstituted (therefore wrong) expected type, and cached resulting type.
2013-11-22 18:58:01 +04:00
svtk
c1ec8cbde9
check Nothing type for all expressions not only for calls and simple names
...
(but excluding statement expressions)
2013-11-22 18:57:58 +04:00
Svetlana Isakova
af930012d5
removed stored systemWithoutExpectedTypeConstraint
...
now we can filter out constraints of special type if necessary
2013-10-16 19:51:53 +04:00
Svetlana Isakova
65e2f47bc3
try intersection of upper bounds as a suggestion
...
not each bound itself
while resolving constraint system
2013-10-16 19:51:53 +04:00
Svetlana Isakova
8a4afb9330
support one more special case of propagating bound constraints
...
(temporary while there is no common constraint system and its resolution)
2013-10-16 19:51:53 +04:00
Svetlana Isakova
cb25e1d55a
if some type parameter has only weak constraints (from bounds), then we consider it as unknown
2013-10-16 19:51:53 +04:00
Svetlana Isakova
9a0ec7949e
fixed bug in constraint system
...
For parameter type T constraint T? <: Int? should NOT transform to T <: Int, it should be T <: Int?
equality constraint T? = Int? should transform to T <: Int? && T >: Int
2013-10-16 19:51:52 +04:00
Evgeny Gerashchenko
d56c59d9d7
Removed toArray() from collections (few tests are still failing).
...
#KT-3352 in progress
2013-10-01 15:11:30 +04:00
Svetlana Isakova
a3f9cef354
fixed bug: 'isStatement' for function body == 'hasBlockBody'
...
not vice versa
2013-09-30 21:06:05 +04:00
Svetlana Isakova
b9f55f5070
test added
2013-09-17 16:09:27 +04:00
Svetlana Isakova
96db2ecabd
added different errors instead of ERROR_COMPILE_TIME_VALUE with different text
...
check type for constants in DataFlowUtils
2013-09-13 16:04:17 +04:00
Svetlana Isakova
b5e6568726
bug fixed: do not substitute type parameters twice
...
through final argument check
2013-09-03 19:50:00 +04:00
Svetlana Isakova
7fabfd8771
test data fixed
...
temporary
when ambiguity inner calls are not completed
2013-09-03 13:09:18 +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
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
dc51a2d238
analyze a lot of expressions in independent of context (expected type) mode
2013-09-03 13:09:05 +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
46cb6b3242
complete resolve for array access expression
2013-09-02 23:18:45 +04:00
Svetlana Isakova
0609f61ee7
added test for nontrivial nested calls
2013-09-02 23:18:44 +04:00
Svetlana Isakova
0eed0c6c7f
extracted 'getResultingCall' method
...
rewrote 'getResultingType' in terms of it
2013-09-02 23:18:43 +04:00
Svetlana Isakova
041505f5b8
report UNRESOLVED_REFERENCE_WRONG_RECEIVER
...
mentioning candidates with wrong receiver
2013-06-20 13:43:03 +04:00
Svetlana Isakova
342e9ebe7a
KT-3563 Compiler requiring java.io.File, and it's unclear why
...
#KT-3563 fixed
2013-06-20 13:43:02 +04:00
Svetlana Isakova
d843608298
'checkType' for qualified properties as function arguments
2013-04-03 20:44:47 +04:00
Svetlana Isakova
8f1b728a08
try to use bounds in type inference
...
if some parameters are unknown
2013-04-03 15:51:17 +04:00
Svetlana Isakova
12c0a2cb77
KT-3461 Nullable argument allowed where shouldn't be
...
#KT-3461 Fixed
2013-04-01 19:07:36 +04:00
Svetlana Isakova
df230d36c2
complete nested calls for array set expression correctly
2013-03-20 17:27:45 +04:00
Svetlana Isakova
1b1ee18f97
KT-3395 mapOf function can't be used as literal
...
#KT-3395 Fixed
2013-03-19 16:47:22 +04:00
Svetlana Isakova
1d55e359a5
complete type inference(*) for variable as function call as well
...
* dependent on expected type
+ get rid of instanceof ResolvedCallImpl check
2013-03-07 13:11:21 +04:00
Svetlana Isakova
0530df6f7b
use TypeCheckingProcedure for generating constraints
...
(in ConstraintSystemImpl)
2013-03-07 13:11:21 +04:00
Svetlana Isakova
8ef067be77
KT-3344 InternalError in compiler when type arguments are not specified
...
#KT-3344 fixed
2013-02-25 18:19:52 +04:00
Evgeny Gerashchenko
b9e5704057
Updated test data and stdlib sources.
2013-02-13 18:08:37 +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
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
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
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
ba9c455ea1
KT-3301 Inference with several supertypes fails
...
#KT-3301 fixed
2013-01-30 20:29:30 +04:00
Svetlana Isakova
22d3adc89f
KT-3184 Type inference seems partially broken
...
#KT-3184 fixed
2012-12-27 18:45:24 +04:00
Svetlana Isakova
70cde87052
checking subtype for invariant type with error generic argument may success
2012-12-26 18:58:57 +04:00