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
Svetlana Isakova
38cc3e39e4
test for obsolete KT-2741
...
#KT-2741 obsolete
2012-12-26 18:01:23 +04:00
Svetlana Isakova
a299cec2eb
KT-3174 Call resolver doesn't understand type is not-nullable after ?. safe call
...
#KT-3174 fixed
2012-12-26 16:43:59 +04:00
Svetlana Isakova
9b645589df
KT-2838 Type inference failed on passing null as a nullable argument
...
#KT-2838 fixed
2012-12-26 14:38:53 +04:00
Svetlana Isakova
e6594ed5b1
KT-2883 Type inference fails due to non-Unit value returned
...
#KT-2883 fixed
2012-12-26 13:53:42 +04:00
Svetlana Isakova
54dffd6aad
tests for obsolete tasks
...
#KT-3007 obsolete
#KT-3038 obsolete
2012-12-26 13:01:48 +04:00
Svetlana Isakova
b0302246a0
HtmlTabledDescriptorRendererTest renamed to DiagnosticMessageTest
2012-12-25 19:12:01 +04:00
Svetlana Isakova
76a62d8b7d
added PLACEHOLDER_FUNCTION_TYPE tests
2012-12-25 19:12:01 +04:00
Svetlana Isakova
4089ac68bd
improved error reporting
...
when error type is a generic parameter
2012-12-25 19:12:01 +04:00
Svetlana Isakova
19e6b02da8
CANNOT_INFER_PARAMETER_TYPE reporting improvement
2012-12-25 19:12:01 +04:00
Svetlana Isakova
2077faa76a
no ambiguity when overloading with different function type
...
(in incomplete resolve)
2012-12-25 19:12:01 +04:00
Svetlana Isakova
972b234db6
KT-3150 Kotlin m4 don't recognize function literals
...
#KT-3150 fixed
added check for PLACEHOLDER_FUNCTION_TYPE to constraint system
2012-12-25 19:12:00 +04:00
Andrey Breslav
c849a0c4e3
Redundant/conflicting projections
2012-11-24 15:59:16 +04:00
Andrey Breslav
12fd07af08
Report an error when variance is specified for a function or property type parameter
2012-11-24 15:59:16 +04:00