Commit Graph

25 Commits

Author SHA1 Message Date
Alexey Sedunov 9fee8600cb Pseudocode: Do not generate implicit return instruction inside of
Unit-typed lambdas
 #KT-5549 Fixed
2014-08-05 18:14:40 +04:00
Alexey Sedunov 9cbcabffa4 Control-Flow Analysis: Reuse pseudo-value information for unused expression analysis 2014-07-28 13:07:37 +04:00
Alexey Sedunov 77bbf8f73b Pseudocode: Generate fake values for Unit/Nothing-typed expressions 2014-07-28 13:07:29 +04:00
Zalim Bashorov c767ffc3e7 Unit.VALUE -> Unit in testData 2014-07-25 17:16:40 +04:00
Svetlana Isakova e0f37bbef0 Generate parse error on label without name '@' 2014-05-20 15:07:03 +04:00
Svetlana Isakova 70374ea9be KT-4529 Lambdas are analyzed improperly in an infix call nested inside a println
#KT-4529 Fixed
2014-02-12 14:47:10 +04:00
Svetlana Isakova dd6940be41 added CHECK_TYPE directive to diagnostic tests 2013-12-19 13:01:05 +04:00
svtk 9d3a7804cc Fixed tests for labels.
The bug was automatically fixed by previous commit.
2013-11-22 18:58:01 +04:00
Svetlana Isakova 9fc66d686e treat function literals without value argument list
as without arguments by default
2013-10-16 20:41:21 +04:00
Svetlana Isakova ab7e3ce78c interpret block with function literal as function literal
(temporary)
2013-10-16 20:41:21 +04:00
Svetlana Isakova 845b6f7d7e fixed bug
NULL_FOR_NONNULL_TYPE can represent type mismatch error as well
(later the whole method 'makeTraceInterceptingTypeMismatch' should be removed)
2013-09-17 16:09:26 +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
Andrey Breslav 6cee65d74e A test for nesting implicitly labeled calls
The actual error message should be "return not allowed", but due to a bug in label resolution it is "unresolved reference"
2013-08-22 17:13:08 +04:00
Andrey Breslav 55eb994502 KT-3919 Automatic labeling of lambdas by receiving functions
#KT-3919 Fixed
2013-08-22 14:27:01 +04:00
Andrey Breslav a51ea10f55 No need to produce error types when RETURN_NOT_ALLOWED_EXPLICIT_RETURN_TYPE_REQUIRED is reported 2013-08-21 20:12:05 +04:00
Andrey Breslav 3f3ee378f3 Test that local return has type Nothing 2013-08-21 20:12:05 +04:00
Andrey Breslav 08625a6b2f Local returns are only allowed with explicitly specified return types
This is a temporary limitation: otherwise type inference is having trouble to account for all the returned expressions.
 We will fix the inference and remove the limitation
2013-08-21 20:12:04 +04:00
Andrey Breslav 4138ac4e36 Support local returns in lambdas 2013-08-21 20:12:04 +04:00
Andrey Breslav db70087573 Labels on function literal arguments are processed properly 2013-08-21 20:12:04 +04:00
Andrey Breslav 9f90fd0938 No "unreachable code" errors when an illegal return expression is the last in a lambda 2013-08-21 20:12:04 +04:00
Svetlana Isakova ca88a01e1d no 'dangling function literal' check for nested calls 2013-06-06 17:20:10 +04:00
Wojciech Lopata 328e579852 Fix reporting of EXPECTING_PARAMETER/RETURN_TYPE_MISMATCH 2013-04-16 14:06:09 +02:00
Mikhael Bogdanov 79bf174e93 Warning for unused function literal in do..while 2013-03-20 20:50:06 +04:00
Svetlana Isakova c37d7352a5 improved reporting TYPE_MISMATCH error for function literals
(introduced EXPECTED_PARAMETER_TYPE_MISMATCH, EXPECTED_RETURN_TYPE_MISMATCH, EXPECTED_PARAMETERS_NUMBER_MISMATCH
instead of reporting TYPE_MISMATCH on the whole function literal)
2012-12-25 19:12:00 +04:00
Svetlana Isakova 7d768847a0 KT-2906 If function parameter/variable is invoked in closure using parenthesis syntax, in IDEA it is not highlighted as captured in closure
#KT-2906 fixed
2012-10-16 16:00:22 +04:00