From 481686c372f7a41098a5a897b24d3895c3c921ba Mon Sep 17 00:00:00 2001 From: lasinicl Date: Fri, 8 Oct 2021 23:03:27 +0530 Subject: [PATCH 01/14] Add range expr tests --- .../range-expr/range_expr_exclusive.balt | 4919 ++++++++++++++++ .../range-expr/range_expr_inclusive.balt | 4924 +++++++++++++++++ 2 files changed, 9843 insertions(+) create mode 100644 conformance/lang/expressions/range-expr/range_expr_exclusive.balt create mode 100644 conformance/lang/expressions/range-expr/range_expr_inclusive.balt diff --git a/conformance/lang/expressions/range-expr/range_expr_exclusive.balt b/conformance/lang/expressions/range-expr/range_expr_exclusive.balt new file mode 100644 index 00000000..a323e2c7 --- /dev/null +++ b/conformance/lang/expressions/range-expr/range_expr_exclusive.balt @@ -0,0 +1,4919 @@ +Test-Case: output +Description: Test range expression when values of expressions are positive integers +Labels: range-expr, iterable-exclusive, int, DecimalNumber, additive-expr + +function init() { + int startIndex = 0; + int endIndex = 6; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 6 +} + +Test-Case: output +Description: Test range expression when values of expressions are negative integers +Labels: range-expr, iterable-exclusive, int, DecimalNumber, unary-minus, additive-expr + +function init() { + int startIndex = -6; + int endIndex = -1; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 5 +} + +Test-Case: output +Description: Test range expression when values of expressions are integers +Labels: range-expr, iterable-exclusive, int, DecimalNumber, unary-minus, additive-expr + +function init() { + int startIndex = -10; + int endIndex = 20; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 30 +} + +Test-Case: output +Description: Test range expression when values of both expressions are integers +Labels: range-expr, iterable-exclusive, int, DecimalNumber, unary-minus, additive-expr + +function init() { + int startIndex = -7635315; + int endIndex = 964732; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 8600047 +} + +Test-Case: output +Description: Test range expression when values of expressions are positive Signed8 integers +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, additive-expr + +function init() { + int:Signed8 startIndex = 1; + int:Signed8 endIndex = 10; + int count = 0; + foreach int i in startIndex ..< endIndex { + count += 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression when values of expressions are negative Signed8 integers +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, unary-minus, additive-expr + +function init() { + int:Signed8 startIndex = -10; + int:Signed8 endIndex = -1; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression when values of expressions are Signed8 integers +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, unary-minus, additive-expr + +function init() { + int:Signed8 startIndex = -10; + int:Signed8 endIndex = 20; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 30 +} + +Test-Case: output +Description: Test range expression when values of expressions are positive Signed16 integers +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, additive-expr + +function init() { + int:Signed16 startIndex = 1; + int:Signed16 endIndex = 10; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression when values of expressions are negative Signed16 integers +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, unary-minus, additive-expr + +function init() { + int:Signed16 startIndex = -10; + int:Signed16 endIndex = -1; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression when values of expressions are Signed16 integers +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, unary-minus, additive-expr + +function init() { + int:Signed16 startIndex = -10; + int:Signed16 endIndex = 20; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 30 +} + +Test-Case: output +Description: Test range expression when values of expressions are positive Signed32 integers +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, additive-expr + +function init() { + int:Signed32 startIndex = 1; + int:Signed32 endIndex = 10; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression when values of expressions are negative Signed32 integers +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, unary-minus, additive-expr + +function init() { + int:Signed32 startIndex = -10; + int:Signed32 endIndex = -1; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression when values of expressions are Signed32 integers +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, unary-minus, additive-expr + +function init() { + int:Signed32 startIndex = -10; + int:Signed32 endIndex = 20; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 30 +} + +Test-Case: output +Description: Test range expression when values of expressions are Unsigned8 integers +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned8, additive-expr + +function init() { + int:Unsigned8 startIndex = 1; + int:Unsigned8 endIndex = 10; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression when values of expressions are Unsigned16 integers +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned16, additive-expr + +function init() { + int:Unsigned16 startIndex = 1; + int:Unsigned16 endIndex = 10; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression when values of expressions are Unsigned32 integers +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned32, additive-expr + +function init() { + int:Unsigned32 startIndex = 1; + int:Unsigned32 endIndex = 10; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a positive integer and value of the + second expression is a positive Signed8 integer. +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, additive-expr + +function init() { + int startIndex = 1; + int:Signed8 endIndex = 10; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a negative integer and value of the + second expression is a negative Signed8 integer. +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, unary-minus, additive-expr + +function init() { + int startIndex = -10; + int:Signed8 endIndex = -1; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a negative integer and value of the + second expression is a positive Signed8 integer. +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, unary-minus, additive-expr + +function init() { + int startIndex = -10; + int:Signed8 endIndex = 2; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 12 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a positive integer and value of the + second expression is a positive Signed16 integer. +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, additive-expr + +function init() { + int startIndex = 1; + int:Signed16 endIndex = 10; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a negative integer and value of the + second expression is a negative Signed16 integer. +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, unary-minus, additive-expr + +function init() { + int startIndex = -10; + int:Signed16 endIndex = -1; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a negative integer and value of the + second expression is a positive Signed16 integer. +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, unary-minus, additive-expr + +function init() { + int startIndex = -10; + int:Signed16 endIndex = 2; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 12 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a positive integer and value of the + second expression is a positive Signed32 integer. +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, additive-expr + +function init() { + int startIndex = 1; + int:Signed32 endIndex = 10; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a negative integer and value of the + second expression is a negative Signed32 integer. +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, unary-minus, additive-expr + +function init() { + int startIndex = -10; + int:Signed32 endIndex = -1; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a negative integer and value of the + second expression is a positive Signed32 integer. +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, unary-minus, additive-expr + +function init() { + int startIndex = -10; + int:Signed32 endIndex = 2; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 12 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a positive integer and value of the + second expression is a Unsigned8 integer. +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned8, additive-expr + +function init() { + int startIndex = 1; + int:Unsigned8 endIndex = 10; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a negative integer and value of the + second expression is a Unsigned8 integer. +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned8, unary-minus, additive-expr + +function init() { + int startIndex = -10; + int:Unsigned8 endIndex = 2; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 12 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a positive integer and value of the + second expression is a byte. +Fail-Issue: ballerina-platform/ballerina-lang#33139 +Labels: range-expr, iterable-exclusive, int, DecimalNumber, byte, additive-expr + +function init() { + int startIndex = 1; + byte endIndex = 10; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a negative integer and value of the + second expression is a byte. +Fail-Issue: ballerina-platform/ballerina-lang#33139 +Labels: range-expr, iterable-exclusive, int, DecimalNumber, byte, unary-minus, additive-expr + +function init() { + int startIndex = -10; + byte endIndex = 2; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 12 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a positive integer and value of the + second expression is a Unsigned16 integer. +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned16, additive-expr + +function init() { + int startIndex = 1; + int:Unsigned16 endIndex = 10; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a negative integer and value of the + second expression is a Unsigned16 integer. +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned16, unary-minus, additive-expr + +function init() { + int startIndex = -10; + int:Unsigned16 endIndex = 2; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 12 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a positive integer and value of the + second expression is a Unsigned32 integer. +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned32, additive-expr + +function init() { + int startIndex = 1; + int:Unsigned32 endIndex = 10; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a negative integer and value of the + second expression is a Unsigned32 integer. +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned32, unary-minus, additive-expr + +function init() { + int startIndex = -10; + int:Unsigned32 endIndex = 2; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 12 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a positive Signed8 integer and value of the + second expression is a positive integer. +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, additive-expr + +function init() { + int:Signed8 startIndex = 1; + int endIndex = 10; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a negative Signed8 integer and value of the + second expression is a negative integer. +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, unary-minus, additive-expr + +function init() { + int:Signed8 startIndex = -10; + int endIndex = -1; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a negative Signed8 integer and value of the + second expression is a positive integer. +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, unary-minus, additive-expr + +function init() { + int:Signed8 startIndex = -10; + int endIndex = 2; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 12 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a positive Signed8 integer and value of the + second expression is a positive Signed16 integer. +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Signed16, additive-expr + +function init() { + int:Signed8 startIndex = 1; + int:Signed16 endIndex = 10; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a negative Signed8 integer and value of the + second expression is a negative Signed16 integer. +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Signed16, unary-minus, additive-expr + +function init() { + int:Signed8 startIndex = -10; + int:Signed16 endIndex = -1; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a negative Signed8 integer and value of the + second expression is a positive Signed16 integer. +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Signed16, unary-minus, additive-expr + +function init() { + int:Signed8 startIndex = -10; + int:Signed16 endIndex = 2; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 12 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a positive Signed8 integer and value of the + second expression is a positive Signed32 integer. +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Signed32, additive-expr + +function init() { + int:Signed8 startIndex = 1; + int:Signed32 endIndex = 10; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a negative Signed8 integer and value of the + second expression is a negative Signed32 integer. +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Signed32, unary-minus, additive-expr + +function init() { + int:Signed8 startIndex = -10; + int:Signed32 endIndex = -1; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a negative Signed8 integer and value of the + second expression is a positive Signed32 integer. +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Signed32, unary-minus, additive-expr + +function init() { + int:Signed8 startIndex = -10; + int:Signed32 endIndex = 2; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 12 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a positive Signed8 integer and value of the + second expression is a Unsigned8 integer. +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Unsigned8, additive-expr + +function init() { + int:Signed8 startIndex = 1; + int:Unsigned8 endIndex = 10; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a negative Signed8 integer and value of the + second expression is a Unsigned8 integer. +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Unsigned8, unary-minus, additive-expr + +function init() { + int:Signed8 startIndex = -10; + int:Unsigned8 endIndex = 2; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 12 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a positive Signed8 integer and value of the + second expression is a byte. +Fail-Issue: ballerina-platform/ballerina-lang#33139 +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, byte, additive-expr + +function init() { + int:Signed8 startIndex = 1; + byte endIndex = 10; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a negative Signed8 integer and value of the + second expression is a byte. +Fail-Issue: ballerina-platform/ballerina-lang#33139 +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, byte, unary-minus, additive-expr + +function init() { + int:Signed8 startIndex = -10; + byte endIndex = 2; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 12 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a positive Signed8 integer and value of the + second expression is a Unsigned16 integer. +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Unsigned16, additive-expr + +function init() { + int:Signed8 startIndex = 1; + int:Unsigned16 endIndex = 10; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a negative Signed8 integer and value of the + second expression is a Unsigned16 integer. +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Unsigned16, unary-minus, additive-expr + +function init() { + int:Signed8 startIndex = -10; + int:Unsigned16 endIndex = 2; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 12 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a positive Signed8 integer and value of the + second expression is a Unsigned32 integer. +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Unsigned32, additive-expr + +function init() { + int:Signed8 startIndex = 1; + int:Unsigned32 endIndex = 10; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a negative Signed8 integer and value of the + second expression is a Unsigned32 integer. +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Unsigned32, unary-minus, additive-expr + +function init() { + int:Signed8 startIndex = -10; + int:Unsigned32 endIndex = 2; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 12 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a positive Signed16 integer and value of the + second expression is a positive integer. +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, additive-expr + +function init() { + int:Signed16 startIndex = 1; + int endIndex = 10; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a negative Signed16 integer and value of the + second expression is a negative integer. +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, unary-minus, additive-expr + +function init() { + int:Signed16 startIndex = -10; + int endIndex = -1; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a negative Signed16 integer and value of the + second expression is a positive integer. +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, unary-minus, additive-expr + +function init() { + int:Signed16 startIndex = -10; + int endIndex = 2; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 12 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a positive Signed16 integer and value of the + second expression is a positive Signed8 integer. +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Signed16, additive-expr + +function init() { + int:Signed16 startIndex = 1; + int:Signed8 endIndex = 10; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a negative Signed16 integer and value of the + second expression is a negative Signed8 integer. +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Signed16, unary-minus, additive-expr + +function init() { + int:Signed16 startIndex = -10; + int:Signed8 endIndex = -1; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a negative Signed16 integer and value of the + second expression is a positive Signed8 integer. +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Signed16, unary-minus, additive-expr + +function init() { + int:Signed16 startIndex = -10; + int:Signed8 endIndex = 2; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 12 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a positive Signed16 integer and value of the + second expression is a positive Signed32 integer. +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, int:Signed32, additive-expr + +function init() { + int:Signed16 startIndex = 1; + int:Signed32 endIndex = 10; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a negative Signed16 integer and value of the + second expression is a negative Signed32 integer. +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, int:Signed32, unary-minus, additive-expr + +function init() { + int:Signed16 startIndex = -10; + int:Signed32 endIndex = -1; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a negative Signed16 integer and value of the + second expression is a positive Signed32 integer. +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, int:Signed32, unary-minus, additive-expr + +function init() { + int:Signed16 startIndex = -10; + int:Signed32 endIndex = 2; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 12 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a positive Signed16 integer and value of the + second expression is a Unsigned8 integer. +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, int:Unsigned8, additive-expr + +function init() { + int:Signed16 startIndex = 1; + int:Unsigned8 endIndex = 10; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a negative Signed16 integer and value of the + second expression is a Unsigned8 integer. +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, int:Unsigned8, unary-minus, additive-expr + +function init() { + int:Signed16 startIndex = -10; + int:Unsigned8 endIndex = 2; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 12 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a positive Signed16 integer and value of the + second expression is a byte. +Fail-Issue: ballerina-platform/ballerina-lang#33139 +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, byte, additive-expr + +function init() { + int:Signed16 startIndex = 1; + byte endIndex = 10; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a negative Signed16 integer and value of the + second expression is a byte. +Fail-Issue: ballerina-platform/ballerina-lang#33139 +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, byte, unary-minus, additive-expr + +function init() { + int:Signed16 startIndex = -10; + byte endIndex = 2; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 12 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a positive Signed16 integer and value of the + second expression is a Unsigned16 integer. +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, int:Unsigned16, additive-expr + +function init() { + int:Signed16 startIndex = 1; + int:Unsigned16 endIndex = 10; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a negative Signed16 integer and value of the + second expression is a Unsigned16 integer. +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, int:Unsigned16, unary-minus, additive-expr + +function init() { + int:Signed16 startIndex = -10; + int:Unsigned16 endIndex = 2; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 12 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a positive Signed16 integer and value of the + second expression is a Unsigned32 integer. +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, int:Unsigned32, additive-expr + +function init() { + int:Signed16 startIndex = 1; + int:Unsigned32 endIndex = 10; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a negative Signed16 integer and value of the + second expression is a Unsigned32 integer. +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, int:Unsigned32, unary-minus, additive-expr + +function init() { + int:Signed16 startIndex = -10; + int:Unsigned32 endIndex = 2; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 12 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a positive Signed32 integer and value of the + second expression is a positive integer. +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, additive-expr + +function init() { + int:Signed32 startIndex = 1; + int endIndex = 10; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a negative Signed32 integer and value of the + second expression is a negative integer. +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, unary-minus, additive-expr + +function init() { + int:Signed32 startIndex = -10; + int endIndex = -1; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a negative Signed32 integer and value of the + second expression is a positive integer. +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, unary-minus, additive-expr + +function init() { + int:Signed32 startIndex = -10; + int endIndex = 2; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 12 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a positive Signed32 integer and value of the + second expression is a positive Signed8 integer. +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Signed32, additive-expr + +function init() { + int:Signed32 startIndex = 1; + int:Signed8 endIndex = 10; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a negative Signed32 integer and value of the + second expression is a negative Signed8 integer. +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Signed32, unary-minus, additive-expr + +function init() { + int:Signed32 startIndex = -10; + int:Signed8 endIndex = -1; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a negative Signed32 integer and value of the + second expression is a positive Signed8 integer. +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Signed32, unary-minus, additive-expr + +function init() { + int:Signed32 startIndex = -10; + int:Signed8 endIndex = 2; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 12 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a positive Signed32 integer and value of the + second expression is a positive Signed16 integer. +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, int:Signed32, additive-expr + +function init() { + int:Signed32 startIndex = 1; + int:Signed16 endIndex = 10; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a negative Signed32 integer and value of the + second expression is a negative Signed16 integer. +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, int:Signed32, unary-minus, additive-expr + +function init() { + int:Signed32 startIndex = -10; + int:Signed16 endIndex = -1; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a negative Signed32 integer and value of the + second expression is a positive Signed16 integer. +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, int:Signed32, unary-minus, additive-expr + +function init() { + int:Signed32 startIndex = -10; + int:Signed16 endIndex = 2; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 12 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a positive Signed32 integer and value of the + second expression is a Unsigned8 integer. +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, int:Unsigned8, additive-expr + +function init() { + int:Signed32 startIndex = 1; + int:Unsigned8 endIndex = 10; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a negative Signed32 integer and value of the + second expression is a Unsigned8 integer. +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, int:Unsigned8, unary-minus, additive-expr + +function init() { + int:Signed32 startIndex = -10; + int:Unsigned8 endIndex = 2; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 12 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a positive Signed32 integer and value of the + second expression is a byte. +Fail-Issue: ballerina-platform/ballerina-lang#33139 +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, byte, additive-expr + +function init() { + int:Signed32 startIndex = 1; + byte endIndex = 10; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a negative Signed32 integer and value of the + second expression is a byte. +Fail-Issue: ballerina-platform/ballerina-lang#33139 +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, byte, unary-minus, additive-expr + +function init() { + int:Signed32 startIndex = -10; + byte endIndex = 2; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 12 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a positive Signed32 integer and value of the + second expression is a Unsigned16 integer. +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, int:Unsigned16, additive-expr + +function init() { + int:Signed32 startIndex = 1; + int:Unsigned16 endIndex = 10; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a negative Signed32 integer and value of the + second expression is a Unsigned16 integer. +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, int:Unsigned16, unary-minus, additive-expr + +function init() { + int:Signed32 startIndex = -10; + int:Unsigned16 endIndex = 2; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 12 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a positive Signed32 integer and value of the + second expression is a Unsigned32 integer. +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, int:Unsigned32, additive-expr + +function init() { + int:Signed32 startIndex = 1; + int:Unsigned32 endIndex = 10; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a negative Signed32 integer and value of the + second expression is a Unsigned32 integer. +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, int:Unsigned32, unary-minus, additive-expr + +function init() { + int:Signed32 startIndex = -10; + int:Unsigned32 endIndex = 2; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 12 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a Unsigned8 integer and value of the + second expression is a positive integer. +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned8, additive-expr + +function init() { + int:Unsigned8 startIndex = 1; + int endIndex = 10; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a Unsigned8 integer and value of the + second expression is a positive Signed8 integer. +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Unsigned8, additive-expr + +function init() { + int:Unsigned8 startIndex = 1; + int:Signed8 endIndex = 10; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a Unsigned8 integer and value of the + second expression is a positive Signed16 integer. +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, int:Unsigned8, additive-expr + +function init() { + int:Unsigned8 startIndex = 1; + int:Signed16 endIndex = 10; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a Unsigned8 integer and value of the + second expression is a positive Signed32 integer. +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, int:Unsigned8, additive-expr + +function init() { + int:Unsigned8 startIndex = 1; + int:Signed32 endIndex = 10; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a Unsigned8 integer and value of the + second expression is a byte. +Fail-Issue: ballerina-platform/ballerina-lang#33139 +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned8, byte, additive-expr + +function init() { + int:Unsigned8 startIndex = 1; + byte endIndex = 10; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a Unsigned8 integer and value of the + second expression is a Unsigned16 integer. +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned8, int:Unsigned16, additive-expr + +function init() { + int:Unsigned8 startIndex = 1; + int:Unsigned16 endIndex = 10; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a Unsigned8 integer and value of the + second expression is a Unsigned32 integer. +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned8, int:Unsigned32, additive-expr + +function init() { + int:Unsigned8 startIndex = 1; + int:Unsigned32 endIndex = 10; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a Unsigned16 integer and value of the + second expression is a positive integer. +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned16, additive-expr + +function init() { + int:Unsigned16 startIndex = 1; + int endIndex = 10; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a Unsigned16 integer and value of the + second expression is a positive Signed8 integer. +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Unsigned16, additive-expr + +function init() { + int:Unsigned16 startIndex = 1; + int:Signed8 endIndex = 10; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a Unsigned16 integer and value of the + second expression is a positive Signed16 integer. +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, int:Unsigned16, additive-expr + +function init() { + int:Unsigned16 startIndex = 1; + int:Signed16 endIndex = 10; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a Unsigned16 integer and value of the + second expression is a positive Signed32 integer. +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, int:Unsigned16, additive-expr + +function init() { + int:Unsigned16 startIndex = 1; + int:Signed32 endIndex = 10; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a Unsigned16 integer and value of the + second expression is a Unsigned8 integer. +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned8, int:Unsigned16, additive-expr + +function init() { + int:Unsigned16 startIndex = 1; + int:Unsigned8 endIndex = 10; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a Unsigned16 integer and value of the + second expression is a byte. +Fail-Issue: ballerina-platform/ballerina-lang#33139 +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned16, byte, additive-expr + +function init() { + int:Unsigned16 startIndex = 1; + byte endIndex = 10; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a Unsigned16 integer and value of the + second expression is a Unsigned32 integer. +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned16, int:Unsigned32, additive-expr + +function init() { + int:Unsigned16 startIndex = 1; + int:Unsigned32 endIndex = 10; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a Unsigned32 integer and value of the + second expression is a positive integer. +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned32, additive-expr + +function init() { + int:Unsigned32 startIndex = 1; + int endIndex = 10; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a Unsigned32 integer and value of the + second expression is a positive Signed8 integer. +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Unsigned32, additive-expr + +function init() { + int:Unsigned32 startIndex = 1; + int:Signed8 endIndex = 10; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a Unsigned32 integer and value of the + second expression is a positive Signed16 integer. +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, int:Unsigned32, additive-expr + +function init() { + int:Unsigned32 startIndex = 1; + int:Signed16 endIndex = 10; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a Unsigned32 integer and value of the + second expression is a positive Signed32 integer. +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, int:Unsigned32, additive-expr + +function init() { + int:Unsigned32 startIndex = 1; + int:Signed32 endIndex = 10; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a Unsigned32 integer and value of the + second expression is a Unsigned8 integer. +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned8, int:Unsigned32, additive-expr + +function init() { + int:Unsigned32 startIndex = 1; + int:Unsigned8 endIndex = 10; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a Unsigned32 integer and value of the + second expression is a byte. +Fail-Issue: ballerina-platform/ballerina-lang#33139 +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned32, byte, additive-expr + +function init() { + int:Unsigned32 startIndex = 1; + byte endIndex = 10; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a Unsigned32 integer and value of the + second expression is a Unsigned16 integer. +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned16, int:Unsigned32, additive-expr + +function init() { + int:Unsigned32 startIndex = 1; + int:Unsigned16 endIndex = 10; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression when values of expressions are of user-defined subtypes of int. +Fail-Issue: ballerina-platform/ballerina-lang#33139 +Labels: range-expr, iterable-exclusive, int, DecimalNumber, singleton-type, union-type, module-type-decl, + additive-expr + +type Ints 1|10; + +function init() { + Ints startIndex = 1; + Ints endIndex = 10; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression when values of expressions are of union of int subtypes. +Fail-Issue: ballerina-platform/ballerina-lang#33139 +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Unsigned32, union-type, additive-expr + +function init() { + int:Signed8|int:Unsigned32 startIndex = 1; + int:Signed8|int:Unsigned32 endIndex = 10; + int count = 0; + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression when the value of the first expression and the value of the second expression + is equal. +Labels: range-expr, iterable-exclusive, int, DecimalNumber, additive-expr + +function init() { + int startIndex = 5; + int endIndex = 5; + int count = 0; + + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 0 +} + +Test-Case: output +Description: Test range expression when the value of the first expression is less than the + value of the second expression. +Labels: range-expr, iterable-exclusive, int, DecimalNumber, additive-expr + +function init() { + int startIndex = 5; + int endIndex = 3; + int count = 0; + + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 0 +} + +Test-Case: output +Description: Test range expression when the types expressions are inferred. +Labels: range-expr, iterable-exclusive, int, DecimalNumber, additive-expr, var + +function init() { + var startIndex = 1; + var endIndex = 10; + int count = 0; + + foreach int i in startIndex ..< endIndex { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test field and member access as expressions in range expression. +Labels: range-expr, iterable-exclusive, array-type, DecimalNumber, field-access-expr, int, list-constructor, + mapping-constructor, member-access-expr, module-type-defn, record-type + +type Record record { + int x; +}; + +function init() { + Record c = {x: 10}; + int[] d = [30, 40]; + int count = 0; + + foreach int i in c.x ..< d[0] { + count = count + 1; + } + io:println(count); // @output 20 +} + +Test-Case: output +Description: Test function and method call as expressions in range expression. +Labels: range-expr, iterable-exclusive, DecimalNumber, int, explicit-new-expr, function-call-expr + module-class-defn, method-call-expr + +class Class { + function getInt() returns int { + return 1; + } +} + +function init() { + Class cls = new Class(); + int count = 0; + + foreach int i in cls.getInt() ..< getInt() { + count = count + 1; + } + io:println(count); // @output 9 +} + +function getInt() returns int { + return 10; +} + +Test-Case: output +Description: Test type cast expression as expressions in range expression. +Labels: range-expr, iterable-exclusive, DecimalNumber, int, type-cast-expr + +function init() { + int count = 0; + + foreach int i in 1.0 ..< 10.0 { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test unary expressions as expressions in range expression. +Labels: range-expr, iterable-exclusive, DecimalNumber, int, unary-complement, unary-minus, unary-plus + +function init() { + int count = 0; + + foreach int i in -10 ..< +2 { + count = count + 1; + } + io:println(count); // @output 12 + + count = 0; + foreach int i in -10 ..< ~2 { + count = count + 1; + } + io:println(count); // @output 7 +} + +Test-Case: output +Description: Test additive expression as expressions in range expression. +Labels: range-expr, iterable-exclusive, additive-expr, int, DecimalNumber + +function init() { + int count = 0; + + foreach int i in 0+1 ..< 12-2 { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test multiplicative expressions as expressions in range expression. +Labels: range-expr, iterable-exclusive, DecimalNumber, int, multiplicative-expr + +function init() { + int count = 0; + + foreach int i in 1*2 ..< 36/4 { + count = count + 1; + } + io:println(count); // @output 7 + + count = 0; + foreach int i in 34%5 ..< 4*5 { + count = count + 1; + } + io:println(count); // @output 16 +} + +Test-Case: output +Description: Test binary bitwise expressions as expressions in range expression. +Labels: range-expr, iterable-exclusive, binary-bitwise-expr, DecimalNumber, int + +function init() { + int count = 0; + + foreach int i in (1&2) ..< (4|8) { + count = count + 1; + } + io:println(count); // @output 12 + + count = 0; + foreach int i in (6|3) ..< (2^8) { + count = count + 1; + } + io:println(count); // @output 3 +} + +Test-Case: output +Description: Test checking expressions as expressions in range expression. +Labels: range-expr, iterable-exclusive, check, checkpanic DecimalNumber, error, int, union-type + +function init() returns error? { + int|error startIndex = 2; + int|error endIndex = 12; + int count = 0; + + foreach int i in check startIndex ..< checkpanic endIndex { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test let expression as expressions in range expression. +Labels: range-expr, iterable-exclusive, DecimalNumber, int, let-expr + +function init() { + int count = 0; + + foreach int i in (let int h1 = 10 in h1) ..< (let int h1 = 25 in h1) { + count = count + 1; + } + io:println(count); // @output 15 +} + +Test-Case: output +Description: Test shift expressions as expressions in range expression. +Labels: range-expr, iterable-exclusive, DecimalNumber, int, shift-expr + +function init() { + int count = 0; + + foreach int i in 1 << 2 ..< 100 >> 4 { + count = count + 1; + } + io:println(count); // @output 2 +} + +Test-Case: output +Description: Test conditional expressions as expressions in range expression. +Labels: range-expr, iterable-exclusive, conditional-expr, DecimalNumber, error, int, nil-literal, + optional-type, union-type + +function init() { + int|error a = 10; + int? b = (); + int count = 0; + + foreach int i in (a is error ? 5 : a) ..< (b ?: 25) { + count = count + 1; + } + io:println(count); // @output 15 +} + +Test-Case: output +Description: Test lang.int constants as expressions in range expression. +Labels: range-expr, iterable-exclusive, int, int:SIGNED8_MAX_VALUE, int:UNSIGNED8_MAX_VALUE + +function init() { + int count = 0; + + foreach int i in int:SIGNED8_MAX_VALUE ..< int:UNSIGNED8_MAX_VALUE { + count = count + 1; + } + io:println(count); // @output 128 +} + +Test-Case: output +Description: Test range expression with iterable object when values of expressions are positive integers +Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, record-type, optional-type + +function init() { + int startIndex = 0; + int endIndex = 6; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 6 +} + +Test-Case: output +Description: Test range expression with iterable object when values of expressions are negative integers +Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, record-type, optional-type, unary-minus + +function init() { + int startIndex = -6; + int endIndex = -1; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 5 +} + +Test-Case: output +Description: Test range expression with iterable object when values of expressions are integers +Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, record-type, optional-type, unary-minus + +function init() { + int startIndex = -10; + int endIndex = 20; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 30 +} + +Test-Case: output +Description: Test range expression with iterable object when values of both expressions are integers +Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, record-type, optional-type, unary-minus + +function init() { + int startIndex = -7635315; + int endIndex = 964732; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 8600047 +} + +Test-Case: output +Description: Test range expression with iterable object when values of expressions are positive Signed8 integers +Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, int:Signed8, additive-expr, + record-type, optional-type + +function init() { + int:Signed8 startIndex = 1; + int:Signed8 endIndex = 10; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + int count = 0; + foreach int i in range { + count += 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression with iterable object when values of expressions are negative Signed8 integers +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, additive-expr, + record-type, optional-type, unary-minus + +function init() { + int:Signed8 startIndex = -10; + int:Signed8 endIndex = -1; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression with iterable object when values of expressions are Signed8 integers +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, additive-expr, + record-type, optional-type, unary-minus + +function init() { + int:Signed8 startIndex = -10; + int:Signed8 endIndex = 2; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 12 +} + +Test-Case: output +Description: Test range expression with iterable object when values of expressions are positive Signed16 integers +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, + record-type, optional-type + +function init() { + int:Signed16 startIndex = 1; + int:Signed16 endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression with iterable object when values of expressions are negative Signed16 integers +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, record-type, + optional-type, unary-minus + +function init() { + int:Signed16 startIndex = -10; + int:Signed16 endIndex = -1; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression with iterable object when values of expressions are Signed16 integers +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, record-type, + optional-type, unary-minus + +function init() { + int:Signed16 startIndex = -10; + int:Signed16 endIndex = 20; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 30 +} + +Test-Case: output +Description: Test range expression with iterable object when values of expressions are positive Signed32 integers +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, record-type, + optional-type + +function init() { + int:Signed32 startIndex = 1; + int:Signed32 endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression with iterable object when values of expressions are negative Signed32 integers +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, record-type, + optional-type, unary-minus + +function init() { + int:Signed32 startIndex = -10; + int:Signed32 endIndex = -1; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression with iterable object when values of expressions are Signed32 integers +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, record-type, + optional-type, unary-minus + +function init() { + int:Signed32 startIndex = -10; + int:Signed32 endIndex = 20; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 30 +} + +Test-Case: output +Description: Test range expression with iterable object when values of expressions are Unsigned8 integers +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, additive-expr, record-type, + optional-type + +function init() { + int:Unsigned8 startIndex = 1; + int:Unsigned8 endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression with iterable object when values of expressions are Unsigned16 integers +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, additive-expr, record-type, + optional-type, unary-minus + +function init() { + int:Unsigned16 startIndex = 1; + int:Unsigned16 endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression with iterable object when values of expressions are Unsigned32 integers +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, additive-expr, record-type, + optional-type, unary-minus + +function init() { + int:Unsigned32 startIndex = 1; + int:Unsigned32 endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a positive integer + and value of the second expression is a positive Signed8 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, additive-expr, record-type, + optional-type + +function init() { + int startIndex = 1; + int:Signed8 endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a negative integer and value of the + second expression is a negative Signed8 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, additive-expr, record-type, + optional-type, unary-minus + +function init() { + int startIndex = -10; + int:Signed8 endIndex = -1; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a negative integer and value of the + second expression is a positive Signed8 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, additive-expr, record-type, + optional-type, unary-minus + +function init() { + int startIndex = -10; + int:Signed8 endIndex = 2; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 12 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a positive integer and value of the + second expression is a positive Signed16 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, record-type, + optional-type + +function init() { + int startIndex = 1; + int:Signed16 endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a negative integer and value of the + second expression is a negative Signed16 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, record-type, + optional-type, unary-minus + +function init() { + int startIndex = -10; + int:Signed16 endIndex = -1; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a negative integer and value of the + second expression is a positive Signed16 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, record-type, + optional-type, unary-minus + +function init() { + int startIndex = -10; + int:Signed16 endIndex = 2; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 12 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a positive integer and value of the + second expression is a positive Signed32 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, record-type, + optional-type + +function init() { + int startIndex = 1; + int:Signed32 endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a negative integer + and value of the second expression is a negative Signed32 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, record-type, + optional-type, unary-minus + +function init() { + int startIndex = -10; + int:Signed32 endIndex = -1; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a negative integer and value of the + second expression is a positive Signed32 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, record-type, + optional-type, unary-minus + +function init() { + int startIndex = -10; + int:Signed32 endIndex = 2; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 12 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a positive integer and value of the + second expression is a Unsigned8 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, additive-expr, record-type, + optional-type + +function init() { + int startIndex = 1; + int:Unsigned8 endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a negative integer and value of the + second expression is a Unsigned8 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, additive-expr, record-type, + optional-type, unary-minus + +function init() { + int startIndex = -10; + int:Unsigned8 endIndex = 2; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 12 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a positive integer and value of the + second expression is a byte. +Fail-Issue: ballerina-platform/ballerina-lang#33139 +Labels: range-expr, iterable-object, int, DecimalNumber, byte, additive-expr, record-type, optional-type + +function init() { + int startIndex = 1; + byte endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a negative integer + and value of the second expression is a byte. +Fail-Issue: ballerina-platform/ballerina-lang#33139 +Labels: range-expr, iterable-object, int, DecimalNumber, byte, additive-expr, record-type, optional-type, unary-minus + +function init() { + int startIndex = -10; + byte endIndex = 2; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 12 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a positive integer + and value of the second expression is a Unsigned16 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, additive-expr, record-type, optional-type + +function init() { + int startIndex = 1; + int:Unsigned16 endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a negative integer + and value of the second expression is a Unsigned16 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, additive-expr, record-type, optional-type, + unary-minus + +function init() { + int startIndex = -10; + int:Unsigned16 endIndex = 2; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 12 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a positive integer + and value of the second expression is a Unsigned32 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, additive-expr, record-type, optional-type + +function init() { + int startIndex = 1; + int:Unsigned32 endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a negative integer + and value of the second expression is a Unsigned32 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, additive-expr, record-type, optional-type, + unary-minus + +function init() { + int startIndex = -10; + int:Unsigned32 endIndex = 2; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 12 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a positive Signed8 + integer and value of the second expression is a positive integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, additive-expr, record-type, optional-type + +function init() { + int:Signed8 startIndex = 1; + int endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a negative Signed8 + integer and value of the second expression is a negative integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, additive-expr, record-type, optional-type, + unary-minus + +function init() { + int:Signed8 startIndex = -10; + int endIndex = -1; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a negative Signed8 + integer and value of the second expression is a positive integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, additive-expr, record-type, optional-type, + unary-minus + +function init() { + int:Signed8 startIndex = -10; + int endIndex = 2; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 12 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a positive Signed8 + integer and value of the second expression is a positive Signed16 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Signed16, additive-expr, record-type, + optional-type + +function init() { + int:Signed8 startIndex = 1; + int:Signed16 endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a negative Signed8 + integer and value of the second expression is a negative Signed16 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Signed16, additive-expr, record-type, + optional-type, unary-minus + +function init() { + int:Signed8 startIndex = -10; + int:Signed16 endIndex = -1; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a negative Signed8 + integer and value of the second expression is a positive Signed16 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Signed16, additive-expr, record-type, + optional-type, unary-minus + +function init() { + int:Signed8 startIndex = -10; + int:Signed16 endIndex = 2; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 12 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a positive Signed8 + integer and value of the second expression is a positive Signed32 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Signed32, additive-expr, record-type, + optional-type + +function init() { + int:Signed8 startIndex = 1; + int:Signed32 endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a negative Signed8 + integer and value of the second expression is a negative Signed32 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Signed32, additive-expr, record-type, + optional-type, unary-minus + +function init() { + int:Signed8 startIndex = -10; + int:Signed32 endIndex = -1; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a negative Signed8 + integer and value of the second expression is a positive Signed32 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Signed32, additive-expr, record-type, + optional-type, unary-minus + +function init() { + int:Signed8 startIndex = -10; + int:Signed32 endIndex = 2; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 12 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a positive Signed8 + integer and value of the second expression is a Unsigned8 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Unsigned8, additive-expr, record-type, + optional-type + +function init() { + int:Signed8 startIndex = 1; + int:Unsigned8 endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a negative Signed8 + integer and value of the second expression is a Unsigned8 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Unsigned8, additive-expr, record-type, + optional-type, unary-minus + +function init() { + int:Signed8 startIndex = -10; + int:Unsigned8 endIndex = 2; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 12 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a positive Signed8 integer and value of the + second expression is a byte. +Fail-Issue: ballerina-platform/ballerina-lang#33139 +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, byte, additive-expr, record-type, + optional-type + +function init() { + int:Signed8 startIndex = 1; + byte endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a negative Signed8 + integer and value of the second expression is a byte. +Fail-Issue: ballerina-platform/ballerina-lang#33139 +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, byte, additive-expr, record-type, + optional-type, unary-minus + +function init() { + int:Signed8 startIndex = -10; + byte endIndex = 2; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 12 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a positive Signed8 + integer and value of the second expression is a Unsigned16 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Unsigned16, additive-expr, record-type, + optional-type + +function init() { + int:Signed8 startIndex = 1; + int:Unsigned16 endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a negative Signed8 + integer and value of the second expression is a Unsigned16 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Unsigned16, additive-expr, record-type, + optional-type, unary-minus + +function init() { + int:Signed8 startIndex = -10; + int:Unsigned16 endIndex = 2; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 12 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a positive Signed8 integer and value of the + second expression is a Unsigned32 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Unsigned32, additive-expr, record-type, + optional-type + +function init() { + int:Signed8 startIndex = 1; + int:Unsigned32 endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a negative Signed8 + integer and value of the second expression is a Unsigned32 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Unsigned32, additive-expr, record-type, + optional-type, unary-minus + +function init() { + int:Signed8 startIndex = -10; + int:Unsigned32 endIndex = 2; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 12 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a positive Signed16 + integer and value of the second expression is a positive integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, record-type, optional-type + +function init() { + int:Signed16 startIndex = 1; + int endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a negative Signed16 + integer and value of the second expression is a negative integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, record-type, optional-type, + unary-minus + +function init() { + int:Signed16 startIndex = -10; + int endIndex = -1; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a negative Signed16 + integer and value of the second expression is a positive integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, record-type, optional-type, + unary-minus + +function init() { + int:Signed16 startIndex = -10; + int endIndex = 2; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 12 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a positive Signed16 + integer and value of the second expression is a positive Signed8 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Signed8, additive-expr, record-type, + optional-type + +function init() { + int:Signed16 startIndex = 1; + int:Signed8 endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a negative Signed16 + integer and value of the second expression is a negative Signed8 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Signed8, additive-expr, record-type, + optional-type, unary-minus + +function init() { + int:Signed16 startIndex = -10; + int:Signed8 endIndex = -1; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a negative Signed16 + integer and value of the second expression is a positive Signed8 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Signed8, additive-expr, record-type, + optional-type, unary-minus + +function init() { + int:Signed16 startIndex = -10; + int:Signed8 endIndex = 2; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 12 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a positive Signed16 + integer and value of the second expression is a positive Signed32 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Signed32, additive-expr, record-type, + optional-type + +function init() { + int:Signed16 startIndex = 1; + int:Signed32 endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a negative Signed16 + integer and value of the second expression is a negative Signed32 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Signed32, additive-expr, record-type, + optional-type, unary-minus + +function init() { + int:Signed16 startIndex = -10; + int:Signed32 endIndex = -1; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a negative Signed16 + integer and value of the second expression is a positive Signed32 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Signed32, additive-expr, record-type, + optional-type, unary-minus + +function init() { + int:Signed16 startIndex = -10; + int:Signed32 endIndex = 2; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 12 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a positive Signed16 + integer and value of the second expression is a Unsigned8 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Unsigned8, additive-expr, record-type, + optional-type + +function init() { + int:Signed16 startIndex = 1; + int:Unsigned8 endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a negative Signed16 + integer and value of the second expression is a Unsigned8 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Unsigned8, additive-expr, record-type, + optional-type, unary-minus + +function init() { + int:Signed16 startIndex = -10; + int:Unsigned8 endIndex = 2; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 12 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a positive Signed16 + integer and value of the second expression is a byte. +Fail-Issue: ballerina-platform/ballerina-lang#33139 +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, byte, additive-expr, record-type, + optional-type + +function init() { + int:Signed16 startIndex = 1; + byte endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a negative Signed16 + integer and value of the second expression is a byte. +Fail-Issue: ballerina-platform/ballerina-lang#33139 +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, byte, additive-expr, record-type, + optional-type, unary-minus + +function init() { + int:Signed16 startIndex = -10; + byte endIndex = 2; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 12 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a positive Signed16 + integer and value of the second expression is a Unsigned16 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Unsigned16, additive-expr, record-type, + optional-type + +function init() { + int:Signed16 startIndex = 1; + int:Unsigned16 endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a negative Signed16 + integer and value of the second expression is a Unsigned16 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Unsigned16, additive-expr, record-type, + optional-type, unary-minus + +function init() { + int:Signed16 startIndex = -10; + int:Unsigned16 endIndex = 2; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 12 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a positive Signed16 + integer and value of the second expression is a Unsigned32 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Unsigned32, additive-expr, record-type, + optional-type + +function init() { + int:Signed16 startIndex = 1; + int:Unsigned32 endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a negative Signed16 + integer and value of the second expression is a Unsigned32 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Unsigned32, additive-expr, record-type, + optional-type, unary-minus + +function init() { + int:Signed16 startIndex = -10; + int:Unsigned32 endIndex = 2; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 12 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a positive Signed32 + integer and value of the second expression is a positive integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, record-type, optional-type + +function init() { + int:Signed32 startIndex = 1; + int endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a negative Signed32 + integer and value of the second expression is a negative integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, record-type, optional-type, + unary-minus + +function init() { + int:Signed32 startIndex = -10; + int endIndex = -1; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a negative Signed32 + integer and value of the second expression is a positive integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, record-type, optional-type, + unary-minus + +function init() { + int:Signed32 startIndex = -10; + int endIndex = 2; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 12 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a positive Signed32 + integer and value of the second expression is a positive Signed8 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Signed8, additive-expr, record-type, + optional-type + +function init() { + int:Signed32 startIndex = 1; + int:Signed8 endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a negative Signed32 + integer and value of the second expression is a negative Signed8 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Signed8, additive-expr, record-type, + optional-type, unary-minus + +function init() { + int:Signed32 startIndex = -10; + int:Signed8 endIndex = -1; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a negative Signed32 + integer and value of the second expression is a positive Signed8 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Signed8, additive-expr, record-type, + optional-type, unary-minus + +function init() { + int:Signed32 startIndex = -10; + int:Signed8 endIndex = 2; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 12 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a positive Signed32 + integer and value of the second expression is a positive Signed16 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Signed16, additive-expr, record-type, + optional-type + +function init() { + int:Signed32 startIndex = 1; + int:Signed16 endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a negative Signed32 + integer and value of the second expression is a negative Signed16 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Signed16, additive-expr, record-type, + optional-type, unary-minus + +function init() { + int:Signed32 startIndex = -10; + int:Signed16 endIndex = -1; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a negative Signed32 + integer and value of the second expression is a positive Signed16 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Signed16, additive-expr, record-type, + optional-type, unary-minus + +function init() { + int:Signed32 startIndex = -10; + int:Signed16 endIndex = 2; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 12 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a positive Signed32 + integer and value of the second expression is a Unsigned8 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Unsigned8, additive-expr, record-type, + optional-type + +function init() { + int:Signed32 startIndex = 1; + int:Unsigned8 endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a negative Signed32 + integer and value of the second expression is a Unsigned8 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Unsigned8, additive-expr, record-type, + optional-type, unary-minus + +function init() { + int:Signed32 startIndex = -10; + int:Unsigned8 endIndex = 2; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 12 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a positive Signed32 + integer and value of the second expression is a byte. +Fail-Issue: ballerina-platform/ballerina-lang#33139 +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, bye, additive-expr, record-type, + optional-type + +function init() { + int:Signed32 startIndex = 1; + byte endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a negative Signed32 + integer and value of the second expression is a byte. +Fail-Issue: ballerina-platform/ballerina-lang#33139 +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, byte, additive-expr, record-type, + optional-type, unary-minus + +function init() { + int:Signed32 startIndex = -10; + byte endIndex = 2; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 12 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a positive Signed32 + integer and value of the second expression is a Unsigned16 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Unsigned16, additive-expr, record-type, + optional-type + +function init() { + int:Signed32 startIndex = 1; + int:Unsigned16 endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a negative Signed32 + integer and value of the second expression is a Unsigned16 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Unsigned16, additive-expr, record-type, + optional-type, unary-minus + +function init() { + int:Signed32 startIndex = -10; + int:Unsigned16 endIndex = 2; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 12 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a positive Signed32 + integer and value of the second expression is a Unsigned32 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Unsigned32, additive-expr, record-type, + optional-type + +function init() { + int:Signed32 startIndex = 1; + int:Unsigned32 endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a negative Signed32 + integer and value of the second expression is a Unsigned32 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Unsigned32, additive-expr, record-type, + optional-type, unary-minus + +function init() { + int:Signed32 startIndex = -10; + int:Unsigned32 endIndex = 2; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 12 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a Unsigned8 + integer and value of the second expression is a positive integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, additive-expr, record-type, optional-type + +function init() { + int:Unsigned8 startIndex = 1; + int endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a Unsigned8 + integer and value of the second expression is a positive Signed8 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, int:Signed8, additive-expr, record-type, + optional-type + +function init() { + int:Unsigned8 startIndex = 1; + int:Signed8 endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a Unsigned8 + integer and value of the second expression is a positive Signed16 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, int:Signed16, additive-expr, record-type, + optional-type + +function init() { + int:Unsigned8 startIndex = 1; + int:Signed16 endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a Unsigned8 + integer and value of the second expression is a positive Signed32 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, int:Signed32, additive-expr, record-type, + optional-type + +function init() { + int:Unsigned8 startIndex = 1; + int:Signed32 endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a Unsigned8 + integer and value of the second expression is a byte. +Fail-Issue: ballerina-platform/ballerina-lang#33139 +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, byte, additive-expr, record-type, + optional-type + +function init() { + int:Unsigned8 startIndex = 1; + byte endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a Unsigned8 + integer and value of the second expression is a Unsigned16 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, int:Unsigned16, additive-expr, record-type, + optional-type + +function init() { + int:Unsigned8 startIndex = 1; + int:Unsigned16 endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a Unsigned8 + integer and value of the second expression is a Unsigned32 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, int:Unsigned32, additive-expr, record-type, + optional-type + +function init() { + int:Unsigned8 startIndex = 1; + int:Unsigned32 endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a Unsigned16 + integer and value of the second expression is a positive integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, additive-expr, record-type, optional-type + +function init() { + int:Unsigned16 startIndex = 1; + int endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a Unsigned16 + integer and value of the second expression is a positive Signed8 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, int:Signed8, additive-expr, record-type, + optional-type + +function init() { + int:Unsigned16 startIndex = 1; + int:Signed8 endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a Unsigned16 + integer and value of the second expression is a positive Signed16 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, int:Signed16, additive-expr, record-type, + optional-type + +function init() { + int:Unsigned16 startIndex = 1; + int:Signed16 endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a Unsigned16 + integer and value of the second expression is a positive Signed32 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, int:Signed32, additive-expr, record-type, + optional-type + +function init() { + int:Unsigned16 startIndex = 1; + int:Signed32 endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a Unsigned16 + integer and value of the second expression is a Unsigned8 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, int:Unsigned8, additive-expr, record-type, + optional-type + +function init() { + int:Unsigned16 startIndex = 1; + int:Unsigned8 endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a Unsigned16 integer + and value of the second expression is a byte. +Fail-Issue: ballerina-platform/ballerina-lang#33139 +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, byte, additive-expr, record-type, + optional-type + +function init() { + int:Unsigned16 startIndex = 1; + byte endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a Unsigned16 + integer and value of the second expression is a Unsigned32 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, int:Unsigned32, additive-expr, record-type, + optional-type + +function init() { + int:Unsigned16 startIndex = 1; + int:Unsigned32 endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a Unsigned32 + integer and value of the second expression is a positive integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, additive-expr, record-type, optional-type + +function init() { + int:Unsigned32 startIndex = 1; + int endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a Unsigned32 + integer and value of the second expression is a positive Signed8 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, int:Signed8, additive-expr, record-type, + optional-type + +function init() { + int:Unsigned32 startIndex = 1; + int:Signed8 endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a Unsigned32 + integer and value of the second expression is a positive Signed16 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, int:Signed16, additive-expr, record-type, + optional-type + +function init() { + int:Unsigned32 startIndex = 1; + int:Signed16 endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a Unsigned32 + integer and value of the second expression is a positive Signed32 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, int:Signed32, additive-expr, record-type, + optional-type + +function init() { + int:Unsigned32 startIndex = 1; + int:Signed32 endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a Unsigned32 + integer and value of the second expression is a Unsigned8 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, int:Unsigned8, additive-expr, record-type, + optional-type + +function init() { + int:Unsigned32 startIndex = 1; + int:Unsigned8 endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a Unsigned32 + integer and value of the second expression is a byte. +Fail-Issue: ballerina-platform/ballerina-lang#33139 +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, byte, additive-expr, record-type, + optional-type + +function init() { + int:Unsigned32 startIndex = 1; + byte endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a Unsigned32 + integer and value of the second expression is a Unsigned16 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, int:Unsigned16, additive-expr, record-type, + optional-type + +function init() { + int:Unsigned32 startIndex = 1; + int:Unsigned16 endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression with iterable object when values of expressions are of user-defined subtypes of int. +Fail-Issue: ballerina-platform/ballerina-lang#33139 +Labels: range-expr, iterable-object, int, DecimalNumber, singleton-type, union-type, module-type-decl, + additive-expr, record-type, optional-type + +type Ints 1|10; + +function init() { + Ints startIndex = 1; + Ints endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression with iterable object when values of expressions are of union of int subtypes. +Fail-Issue: ballerina-platform/ballerina-lang#33139 +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Unsigned32, union-type, additive-expr, + record-type, optional-type + +function init() { + int:Signed8|int:Unsigned32 startIndex = 1; + int:Signed8|int:Unsigned32 endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression with iterable object when the value of the first expression and the value of the + second expression is equal. +Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, record-type, optional-type + +function init() { + int startIndex = 5; + int endIndex = 5; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 0 +} + +Test-Case: output +Description: Test range expression when the value of the first expression is less than the + value of the second expression. +Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, record-type, optional-type + +function init() { + int startIndex = 5; + int endIndex = 3; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 0 +} + +Test-Case: output +Description: Test range expression with iterable object when the types of the values of the expressions are inferred. +Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, record-type, optional-type, var + +function init() { + var startIndex = 1; + var endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression when the types of the values of the expressions and type of the range + expression are inferred. +Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, var + +function init() { + int startIndex = 1; + int endIndex = 10; + int count = 0; + + var range = startIndex ..< endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression at module level. +Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, record-type, optional-type, var + +int startIndex = 1; +int endIndex = 10; + +object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; +} range = startIndex ..< endIndex; + +function init() { + int count = 0; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test range expression at module level. +Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, var + +int startIndex = 1; +int endIndex = 10; + +var range = startIndex ..< endIndex; + +function init() { + int count = 0; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test iterable object returned by the range expression. +Labels: range-expr, int, DecimalNumber, object-type, optional-type, var, value:toBalString + +function init() { + object { + public isolated function iterator() returns (object { + public isolated function next() returns (record {|int value;|}?); + }); + } range = 1 ..< 3; + + var iterator = range.iterator(); + + record {| int value; |}? rec = iterator.next(); + io:println(rec); // @output {"value":1} + io:println(rec?.value); // @output 1 + + rec = iterator.next(); + io:println(rec); // @output {"value":2} + io:println(rec?.value); // @output 2 + + rec = iterator.next(); + io:println(rec.toBalString()); // @output () + io:println(rec?.value.toBalString()); // @output () +} + +Test-Case: output +Description: Test field and member access as expressions in range expression. +Labels: range-expr, iterable-object, array-type, DecimalNumber, field-access-expr, int, list-constructor, + mapping-constructor, member-access-expr, module-type-defn, record-type, optional-type + +type Record record { + int x; +}; + +function init() { + Record c = {x: 10}; + int[] d = [30, 40]; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = c.x ..< d[0]; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 20 +} + +Test-Case: output +Description: Test function and method call as expressions in range expression. +Labels: range-expr, iterable-object, DecimalNumber, int, explicit-new-expr, function-call-expr + module-class-defn, method-call-expr, record-type, optional-type + +class Class { + function getInt() returns int { + return 1; + } +} + +function init() { + Class cls = new Class(); + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = cls.getInt() ..< getInt(); + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 9 +} + +function getInt() returns int { + return 10; +} + +Test-Case: output +Description: Test type cast expression as expressions in range expression. +Labels: range-expr, iterable-object, DecimalNumber, int, type-cast-expr, record-type, optional-type + +function init() { + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = 1.0 ..< 10.0; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test unary expressions as expressions in range expression. +Labels: range-expr, iterable-object, DecimalNumber, int, unary-complement, unary-minus, unary-plus, + record-type, optional-type + +function init() { + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = -10 ..< +2; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 12 + + count = 0; + range = -10 ..< ~2; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 7 +} + +Test-Case: output +Description: Test additive expression as expressions in range expression. +Labels: range-expr, iterable-object, additive-expr, int, DecimalNumber, record-type, optional-type + +function init() { + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = 0+1 ..< 12-2; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 9 +} + +Test-Case: output +Description: Test multiplicative expressions as expressions in range expression. +Labels: range-expr, iterable-object, DecimalNumber, int, multiplicative-expr, record-type, optional-type + +function init() { + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = 1*2 ..< 36/4; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 7 + + count = 0; + range = 34%5 ..< 4*5; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 16 +} + +Test-Case: output +Description: Test binary bitwise expressions as expressions in range expression. +Labels: range-expr, iterable-object, binary-bitwise-expr, DecimalNumber, int, record-type, optional-type + +function init() { + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = (1&2) ..< (4|8); + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 12 + + count = 0; + range = (6|3) ..< (2^8); + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 3 +} + +Test-Case: output +Description: Test checking expressions as expressions in range expression. +Labels: range-expr, iterable-object, check, checkpanic DecimalNumber, error, int, union-type, + record-type, optional-type + +function init() returns error? { + int|error startIndex = 2; + int|error endIndex = 12; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = check startIndex ..< checkpanic endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test let expression as expressions in range expression. +Labels: range-expr, iterable-object, DecimalNumber, int, let-expr, record-type, optional-type + +function init() { + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = (let int h1 = 10 in h1) ..< (let int h1 = 25 in h1); + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 15 +} + +Test-Case: output +Description: Test shift expressions as expressions in range expression. +Labels: range-expr, iterable-object, DecimalNumber, int, shift-expr, record-type, optional-type + +function init() { + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = 1<<2 ..< 100>>4; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 2 +} + +Test-Case: output +Description: Test conditional expressions as expressions in range expression. +Labels: range-expr, iterable-object, conditional-expr, DecimalNumber, error, int, nil-literal, + optional-type, union-type, record-type + +function init() { + int|error a = 10; + int? b = (); + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = (a is error ? 5 : a) ..< (b ?: 25); + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 15 +} + +Test-Case: output +Description: Test lang.int constants as expressions in range expression. +Labels: range-expr, iterable-object, int, int:SIGNED8_MAX_VALUE, int:UNSIGNED8_MAX_VALUE, + record-type, optional-type + +function init() { + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = int:SIGNED8_MAX_VALUE ..< int:UNSIGNED8_MAX_VALUE; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 128 +} + +Test-Case: output +Description: Test isolatedness of range expression. +Fail-Issue: ballerina-platform/ballerina-lang#33139 not isolated? prints false +Labels: range-expr, iterable-object, object-type, record-type, optional-type + +function init() { + object { + *object:Iterable; + public function iterator() returns object { + public function next() returns (record {|int value;|}?); + }; + } range = 1 ..< 10; + + io:println(range is isolated object {}); // @output true +} + +Test-Case: output +Description: Test range expression with query expression. +Labels: range-expr, array-type, int, DecimalNumber, query-expr + +function init() { + int[] a = from int i in 1 ..< 10 + select i; + + io:println(a); // @output [1,2,3,4,5,6,7,8,9] +} + +Test-Case: error +Description: Test range expression when static type of either of the expression is not a subtype of int. +Labels: range-expr, int, DecimalFloatingPointNumber, string + +function init() { + _ = 1.0 ..< 10; // @error ..< not defined as static type of first expression is not a subtype of int + _ = 1 ..< 10.0; // @error ..< not defined as static type of second expression is not a subtype of int + _ = 1.0 ..< 10.0; // @error ..< not defined as static type of both expressions are not subtypes of int + + _ = "1" ..< 10; // @error ..< not defined as static type of first expression is not a subtype of int + _ = 1 ..< "10"; // @error ..< not defined as static type of second expression is not a subtype of int + _ = "1" ..< "10"; // @error ..< not defined as static type of both expressions are not subtypes of int +} + +Test-Case: error +Description: Test assigning the result of range expression to an incompatible type. +Labels: range-expr, int, DecimalNumber, object-type + +function init() { + int _ = 1 ..< 10; // @error result of a range expression is an object + + object { + public isolated function iterator() returns (object { + public isolated function next() returns (record {|float value;|}?); + }); + } _ = 1 ..< 10; // @error next() of range expression's iterable object returns a record {|int value;|} +} + +Test-Case: error +Description: Test assigning the result of range expression to an incompatible type when the static + type of the range expression is inferred. +Labels: range-expr, int, DecimalNumber, object-type, var, record-type, optional-type + +function init() { + var a = 1 ..< 10; + + int _ = a; // @error result of a range expression is an object + + object { + public isolated function iterator() returns (object { + public isolated function next() returns (record {|float value;|}?); + }); + } _ = a; // @error next() of range expression's iterable object returns a record {|int value;|} +} diff --git a/conformance/lang/expressions/range-expr/range_expr_inclusive.balt b/conformance/lang/expressions/range-expr/range_expr_inclusive.balt new file mode 100644 index 00000000..6ee547a0 --- /dev/null +++ b/conformance/lang/expressions/range-expr/range_expr_inclusive.balt @@ -0,0 +1,4924 @@ +Test-Case: output +Description: Test range expression when values of expressions are positive integers +Labels: range-expr, iterable-inclusive, int, DecimalNumber, additive-expr + +function init() { + int startIndex = 0; + int endIndex = 6; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 7 +} + +Test-Case: output +Description: Test range expression when values of expressions are negative integers +Labels: range-expr, iterable-inclusive, int, DecimalNumber, unary-minus, additive-expr + +function init() { + int startIndex = -6; + int endIndex = -1; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 6 +} + +Test-Case: output +Description: Test range expression when values of expressions are integers +Labels: range-expr, iterable-inclusive, int, DecimalNumber, unary-minus, additive-expr + +function init() { + int startIndex = -10; + int endIndex = 20; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 31 +} + +Test-Case: output +Description: Test range expression when values of both expressions are integers +Labels: range-expr, iterable-inclusive, int, DecimalNumber, unary-minus, additive-expr + +function init() { + int startIndex = -7635315; + int endIndex = 964732; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 8600048 +} + +Test-Case: output +Description: Test range expression when values of expressions are positive Signed8 integers +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, additive-expr + +function init() { + int:Signed8 startIndex = 1; + int:Signed8 endIndex = 10; + int count = 0; + foreach int i in startIndex...endIndex { + count += 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression when values of expressions are negative Signed8 integers +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, unary-minus, additive-expr + +function init() { + int:Signed8 startIndex = -10; + int:Signed8 endIndex = -1; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression when values of expressions are Signed8 integers +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, unary-minus, additive-expr + +function init() { + int:Signed8 startIndex = -10; + int:Signed8 endIndex = 20; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 31 +} + +Test-Case: output +Description: Test range expression when values of expressions are positive Signed16 integers +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed16, additive-expr + +function init() { + int:Signed16 startIndex = 1; + int:Signed16 endIndex = 10; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression when values of expressions are negative Signed16 integers +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed16, unary-minus, additive-expr + +function init() { + int:Signed16 startIndex = -10; + int:Signed16 endIndex = -1; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression when values of expressions are Signed16 integers +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed16, unary-minus, additive-expr + +function init() { + int:Signed16 startIndex = -10; + int:Signed16 endIndex = 20; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 31 +} + +Test-Case: output +Description: Test range expression when values of expressions are positive Signed32 integers +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed32, additive-expr + +function init() { + int:Signed32 startIndex = 1; + int:Signed32 endIndex = 10; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression when values of expressions are negative Signed32 integers +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed32, unary-minus, additive-expr + +function init() { + int:Signed32 startIndex = -10; + int:Signed32 endIndex = -1; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression when values of expressions are Signed32 integers +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed32, unary-minus, additive-expr + +function init() { + int:Signed32 startIndex = -10; + int:Signed32 endIndex = 20; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 31 +} + +Test-Case: output +Description: Test range expression when values of expressions are Unsigned8 integers +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Unsigned8, additive-expr + +function init() { + int:Unsigned8 startIndex = 1; + int:Unsigned8 endIndex = 10; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression when values of expressions are Unsigned16 integers +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Unsigned16, additive-expr + +function init() { + int:Unsigned16 startIndex = 1; + int:Unsigned16 endIndex = 10; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression when values of expressions are Unsigned32 integers +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Unsigned32, additive-expr + +function init() { + int:Unsigned32 startIndex = 1; + int:Unsigned32 endIndex = 10; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a positive integer and value of the + second expression is a positive Signed8 integer. +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, additive-expr + +function init() { + int startIndex = 1; + int:Signed8 endIndex = 10; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a negative integer and value of the + second expression is a negative Signed8 integer. +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, unary-minus, additive-expr + +function init() { + int startIndex = -10; + int:Signed8 endIndex = -1; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a negative integer and value of the + second expression is a positive Signed8 integer. +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, unary-minus, additive-expr + +function init() { + int startIndex = -10; + int:Signed8 endIndex = 2; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 13 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a positive integer and value of the + second expression is a positive Signed16 integer. +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed16, additive-expr + +function init() { + int startIndex = 1; + int:Signed16 endIndex = 10; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a negative integer and value of the + second expression is a negative Signed16 integer. +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed16, unary-minus, additive-expr + +function init() { + int startIndex = -10; + int:Signed16 endIndex = -1; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a negative integer and value of the + second expression is a positive Signed16 integer. +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed16, unary-minus, additive-expr + +function init() { + int startIndex = -10; + int:Signed16 endIndex = 2; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 13 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a positive integer and value of the + second expression is a positive Signed32 integer. +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed32, additive-expr + +function init() { + int startIndex = 1; + int:Signed32 endIndex = 10; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a negative integer and value of the + second expression is a negative Signed32 integer. +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed32, unary-minus, additive-expr + +function init() { + int startIndex = -10; + int:Signed32 endIndex = -1; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a negative integer and value of the + second expression is a positive Signed32 integer. +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed32, unary-minus, additive-expr + +function init() { + int startIndex = -10; + int:Signed32 endIndex = 2; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 13 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a positive integer and value of the + second expression is a Unsigned8 integer. +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Unsigned8, additive-expr + +function init() { + int startIndex = 1; + int:Unsigned8 endIndex = 10; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a negative integer and value of the + second expression is a Unsigned8 integer. +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Unsigned8, unary-minus, additive-expr + +function init() { + int startIndex = -10; + int:Unsigned8 endIndex = 2; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 13 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a positive integer and value of the + second expression is a byte. +Fail-Issue: ballerina-platform/ballerina-lang#33139 +Labels: range-expr, iterable-inclusive, int, DecimalNumber, byte, additive-expr + +function init() { + int startIndex = 1; + byte endIndex = 10; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a negative integer and value of the + second expression is a byte. +Fail-Issue: ballerina-platform/ballerina-lang#33139 +Labels: range-expr, iterable-inclusive, int, DecimalNumber, byte, unary-minus, additive-expr + +function init() { + int startIndex = -10; + byte endIndex = 2; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 13 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a positive integer and value of the + second expression is a Unsigned16 integer. +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Unsigned16, additive-expr + +function init() { + int startIndex = 1; + int:Unsigned16 endIndex = 10; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a negative integer and value of the + second expression is a Unsigned16 integer. +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Unsigned16, unary-minus, additive-expr + +function init() { + int startIndex = -10; + int:Unsigned16 endIndex = 2; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 13 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a positive integer and value of the + second expression is a Unsigned32 integer. +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Unsigned32, additive-expr + +function init() { + int startIndex = 1; + int:Unsigned32 endIndex = 10; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a negative integer and value of the + second expression is a Unsigned32 integer. +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Unsigned32, unary-minus, additive-expr + +function init() { + int startIndex = -10; + int:Unsigned32 endIndex = 2; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 13 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a positive Signed8 integer and value of the + second expression is a positive integer. +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, additive-expr + +function init() { + int:Signed8 startIndex = 1; + int endIndex = 10; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a negative Signed8 integer and value of the + second expression is a negative integer. +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, unary-minus, additive-expr + +function init() { + int:Signed8 startIndex = -10; + int endIndex = -1; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a negative Signed8 integer and value of the + second expression is a positive integer. +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, unary-minus, additive-expr + +function init() { + int:Signed8 startIndex = -10; + int endIndex = 2; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 13 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a positive Signed8 integer and value of the + second expression is a positive Signed16 integer. +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, int:Signed16, additive-expr + +function init() { + int:Signed8 startIndex = 1; + int:Signed16 endIndex = 10; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a negative Signed8 integer and value of the + second expression is a negative Signed16 integer. +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, int:Signed16, unary-minus, additive-expr + +function init() { + int:Signed8 startIndex = -10; + int:Signed16 endIndex = -1; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a negative Signed8 integer and value of the + second expression is a positive Signed16 integer. +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, int:Signed16, unary-minus, additive-expr + +function init() { + int:Signed8 startIndex = -10; + int:Signed16 endIndex = 2; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 13 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a positive Signed8 integer and value of the + second expression is a positive Signed32 integer. +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, int:Signed32, additive-expr + +function init() { + int:Signed8 startIndex = 1; + int:Signed32 endIndex = 10; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a negative Signed8 integer and value of the + second expression is a negative Signed32 integer. +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, int:Signed32, unary-minus, additive-expr + +function init() { + int:Signed8 startIndex = -10; + int:Signed32 endIndex = -1; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a negative Signed8 integer and value of the + second expression is a positive Signed32 integer. +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, int:Signed32, unary-minus, additive-expr + +function init() { + int:Signed8 startIndex = -10; + int:Signed32 endIndex = 2; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 13 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a positive Signed8 integer and value of the + second expression is a Unsigned8 integer. +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, int:Unsigned8, additive-expr + +function init() { + int:Signed8 startIndex = 1; + int:Unsigned8 endIndex = 10; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a negative Signed8 integer and value of the + second expression is a Unsigned8 integer. +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, int:Unsigned8, unary-minus, additive-expr + +function init() { + int:Signed8 startIndex = -10; + int:Unsigned8 endIndex = 2; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 13 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a positive Signed8 integer and value of the + second expression is a byte. +Fail-Issue: ballerina-platform/ballerina-lang#33139 +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, byte, additive-expr + +function init() { + int:Signed8 startIndex = 1; + byte endIndex = 10; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a negative Signed8 integer and value of the + second expression is a byte. +Fail-Issue: ballerina-platform/ballerina-lang#33139 +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, byte, unary-minus, additive-expr + +function init() { + int:Signed8 startIndex = -10; + byte endIndex = 2; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 13 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a positive Signed8 integer and value of the + second expression is a Unsigned16 integer. +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, int:Unsigned16, additive-expr + +function init() { + int:Signed8 startIndex = 1; + int:Unsigned16 endIndex = 10; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a negative Signed8 integer and value of the + second expression is a Unsigned16 integer. +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, int:Unsigned16, unary-minus, additive-expr + +function init() { + int:Signed8 startIndex = -10; + int:Unsigned16 endIndex = 2; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 13 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a positive Signed8 integer and value of the + second expression is a Unsigned32 integer. +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, int:Unsigned32, additive-expr + +function init() { + int:Signed8 startIndex = 1; + int:Unsigned32 endIndex = 10; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a negative Signed8 integer and value of the + second expression is a Unsigned32 integer. +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, int:Unsigned32, unary-minus, additive-expr + +function init() { + int:Signed8 startIndex = -10; + int:Unsigned32 endIndex = 2; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 13 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a positive Signed16 integer and value of the + second expression is a positive integer. +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed16, additive-expr + +function init() { + int:Signed16 startIndex = 1; + int endIndex = 10; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a negative Signed16 integer and value of the + second expression is a negative integer. +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed16, unary-minus, additive-expr + +function init() { + int:Signed16 startIndex = -10; + int endIndex = -1; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a negative Signed16 integer and value of the + second expression is a positive integer. +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed16, unary-minus, additive-expr + +function init() { + int:Signed16 startIndex = -10; + int endIndex = 2; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 13 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a positive Signed16 integer and value of the + second expression is a positive Signed8 integer. +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, int:Signed16, additive-expr + +function init() { + int:Signed16 startIndex = 1; + int:Signed8 endIndex = 10; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a negative Signed16 integer and value of the + second expression is a negative Signed8 integer. +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, int:Signed16, unary-minus, additive-expr + +function init() { + int:Signed16 startIndex = -10; + int:Signed8 endIndex = -1; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a negative Signed16 integer and value of the + second expression is a positive Signed8 integer. +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, int:Signed16, unary-minus, additive-expr + +function init() { + int:Signed16 startIndex = -10; + int:Signed8 endIndex = 2; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 13 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a positive Signed16 integer and value of the + second expression is a positive Signed32 integer. +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed16, int:Signed32, additive-expr + +function init() { + int:Signed16 startIndex = 1; + int:Signed32 endIndex = 10; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a negative Signed16 integer and value of the + second expression is a negative Signed32 integer. +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed16, int:Signed32, unary-minus, additive-expr + +function init() { + int:Signed16 startIndex = -10; + int:Signed32 endIndex = -1; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a negative Signed16 integer and value of the + second expression is a positive Signed32 integer. +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed16, int:Signed32, unary-minus, additive-expr + +function init() { + int:Signed16 startIndex = -10; + int:Signed32 endIndex = 2; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 13 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a positive Signed16 integer and value of the + second expression is a Unsigned8 integer. +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed16, int:Unsigned8, additive-expr + +function init() { + int:Signed16 startIndex = 1; + int:Unsigned8 endIndex = 10; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a negative Signed16 integer and value of the + second expression is a Unsigned8 integer. +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed16, int:Unsigned8, unary-minus, additive-expr + +function init() { + int:Signed16 startIndex = -10; + int:Unsigned8 endIndex = 2; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 13 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a positive Signed16 integer and value of the + second expression is a byte. +Fail-Issue: ballerina-platform/ballerina-lang#33139 +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed16, byte, additive-expr + +function init() { + int:Signed16 startIndex = 1; + byte endIndex = 10; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a negative Signed16 integer and value of the + second expression is a byte. +Fail-Issue: ballerina-platform/ballerina-lang#33139 +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed16, byte, unary-minus, additive-expr + +function init() { + int:Signed16 startIndex = -10; + byte endIndex = 2; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 13 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a positive Signed16 integer and value of the + second expression is a Unsigned16 integer. +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed16, int:Unsigned16, additive-expr + +function init() { + int:Signed16 startIndex = 1; + int:Unsigned16 endIndex = 10; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a negative Signed16 integer and value of the + second expression is a Unsigned16 integer. +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed16, int:Unsigned16, unary-minus, additive-expr + +function init() { + int:Signed16 startIndex = -10; + int:Unsigned16 endIndex = 2; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 13 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a positive Signed16 integer and value of the + second expression is a Unsigned32 integer. +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed16, int:Unsigned32, additive-expr + +function init() { + int:Signed16 startIndex = 1; + int:Unsigned32 endIndex = 10; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a negative Signed16 integer and value of the + second expression is a Unsigned32 integer. +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed16, int:Unsigned32, unary-minus, additive-expr + +function init() { + int:Signed16 startIndex = -10; + int:Unsigned32 endIndex = 2; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 13 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a positive Signed32 integer and value of the + second expression is a positive integer. +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed32, additive-expr + +function init() { + int:Signed32 startIndex = 1; + int endIndex = 10; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a negative Signed32 integer and value of the + second expression is a negative integer. +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed32, unary-minus, additive-expr + +function init() { + int:Signed32 startIndex = -10; + int endIndex = -1; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a negative Signed32 integer and value of the + second expression is a positive integer. +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed32, unary-minus, additive-expr + +function init() { + int:Signed32 startIndex = -10; + int endIndex = 2; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 13 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a positive Signed32 integer and value of the + second expression is a positive Signed8 integer. +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, int:Signed32, additive-expr + +function init() { + int:Signed32 startIndex = 1; + int:Signed8 endIndex = 10; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a negative Signed32 integer and value of the + second expression is a negative Signed8 integer. +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, int:Signed32, unary-minus, additive-expr + +function init() { + int:Signed32 startIndex = -10; + int:Signed8 endIndex = -1; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a negative Signed32 integer and value of the + second expression is a positive Signed8 integer. +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, int:Signed32, unary-minus, additive-expr + +function init() { + int:Signed32 startIndex = -10; + int:Signed8 endIndex = 2; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 13 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a positive Signed32 integer and value of the + second expression is a positive Signed16 integer. +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed16, int:Signed32, additive-expr + +function init() { + int:Signed32 startIndex = 1; + int:Signed16 endIndex = 10; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a negative Signed32 integer and value of the + second expression is a negative Signed16 integer. +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed16, int:Signed32, unary-minus, additive-expr + +function init() { + int:Signed32 startIndex = -10; + int:Signed16 endIndex = -1; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a negative Signed32 integer and value of the + second expression is a positive Signed16 integer. +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed16, int:Signed32, unary-minus, additive-expr + +function init() { + int:Signed32 startIndex = -10; + int:Signed16 endIndex = 2; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 13 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a positive Signed32 integer and value of the + second expression is a Unsigned8 integer. +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed32, int:Unsigned8, additive-expr + +function init() { + int:Signed32 startIndex = 1; + int:Unsigned8 endIndex = 10; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a negative Signed32 integer and value of the + second expression is a Unsigned8 integer. +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed32, int:Unsigned8, unary-minus, additive-expr + +function init() { + int:Signed32 startIndex = -10; + int:Unsigned8 endIndex = 2; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 13 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a positive Signed32 integer and value of the + second expression is a byte. +Fail-Issue: ballerina-platform/ballerina-lang#33139 +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed32, byte, additive-expr + +function init() { + int:Signed32 startIndex = 1; + byte endIndex = 10; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a negative Signed32 integer and value of the + second expression is a byte. +Fail-Issue: ballerina-platform/ballerina-lang#33139 +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed32, byte, unary-minus, additive-expr + +function init() { + int:Signed32 startIndex = -10; + byte endIndex = 2; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 13 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a positive Signed32 integer and value of the + second expression is a Unsigned16 integer. +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed32, int:Unsigned16, additive-expr + +function init() { + int:Signed32 startIndex = 1; + int:Unsigned16 endIndex = 10; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a negative Signed32 integer and value of the + second expression is a Unsigned16 integer. +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed32, int:Unsigned16, unary-minus, additive-expr + +function init() { + int:Signed32 startIndex = -10; + int:Unsigned16 endIndex = 2; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 13 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a positive Signed32 integer and value of the + second expression is a Unsigned32 integer. +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed32, int:Unsigned32, additive-expr + +function init() { + int:Signed32 startIndex = 1; + int:Unsigned32 endIndex = 10; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a negative Signed32 integer and value of the + second expression is a Unsigned32 integer. +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed32, int:Unsigned32, unary-minus, additive-expr + +function init() { + int:Signed32 startIndex = -10; + int:Unsigned32 endIndex = 2; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 13 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a Unsigned8 integer and value of the + second expression is a positive integer. +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Unsigned8, additive-expr + +function init() { + int:Unsigned8 startIndex = 1; + int endIndex = 10; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a Unsigned8 integer and value of the + second expression is a positive Signed8 integer. +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, int:Unsigned8, additive-expr + +function init() { + int:Unsigned8 startIndex = 1; + int:Signed8 endIndex = 10; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a Unsigned8 integer and value of the + second expression is a positive Signed16 integer. +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed16, int:Unsigned8, additive-expr + +function init() { + int:Unsigned8 startIndex = 1; + int:Signed16 endIndex = 10; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a Unsigned8 integer and value of the + second expression is a positive Signed32 integer. +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed32, int:Unsigned8, additive-expr + +function init() { + int:Unsigned8 startIndex = 1; + int:Signed32 endIndex = 10; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a Unsigned8 integer and value of the + second expression is a byte. +Fail-Issue: ballerina-platform/ballerina-lang#33139 +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Unsigned8, byte, additive-expr + +function init() { + int:Unsigned8 startIndex = 1; + byte endIndex = 10; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a Unsigned8 integer and value of the + second expression is a Unsigned16 integer. +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Unsigned8, int:Unsigned16, additive-expr + +function init() { + int:Unsigned8 startIndex = 1; + int:Unsigned16 endIndex = 10; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a Unsigned8 integer and value of the + second expression is a Unsigned32 integer. +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Unsigned8, int:Unsigned32, additive-expr + +function init() { + int:Unsigned8 startIndex = 1; + int:Unsigned32 endIndex = 10; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a Unsigned16 integer and value of the + second expression is a positive integer. +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Unsigned16, additive-expr + +function init() { + int:Unsigned16 startIndex = 1; + int endIndex = 10; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a Unsigned16 integer and value of the + second expression is a positive Signed8 integer. +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, int:Unsigned16, additive-expr + +function init() { + int:Unsigned16 startIndex = 1; + int:Signed8 endIndex = 10; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a Unsigned16 integer and value of the + second expression is a positive Signed16 integer. +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed16, int:Unsigned16, additive-expr + +function init() { + int:Unsigned16 startIndex = 1; + int:Signed16 endIndex = 10; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a Unsigned16 integer and value of the + second expression is a positive Signed32 integer. +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed32, int:Unsigned16, additive-expr + +function init() { + int:Unsigned16 startIndex = 1; + int:Signed32 endIndex = 10; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a Unsigned16 integer and value of the + second expression is a Unsigned8 integer. +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Unsigned8, int:Unsigned16, additive-expr + +function init() { + int:Unsigned16 startIndex = 1; + int:Unsigned8 endIndex = 10; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a Unsigned16 integer and value of the + second expression is a byte. +Fail-Issue: ballerina-platform/ballerina-lang#33139 +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Unsigned16, byte, additive-expr + +function init() { + int:Unsigned16 startIndex = 1; + byte endIndex = 10; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a Unsigned16 integer and value of the + second expression is a Unsigned32 integer. +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Unsigned16, int:Unsigned32, additive-expr + +function init() { + int:Unsigned16 startIndex = 1; + int:Unsigned32 endIndex = 10; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a Unsigned32 integer and value of the + second expression is a positive integer. +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Unsigned32, additive-expr + +function init() { + int:Unsigned32 startIndex = 1; + int endIndex = 10; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a Unsigned32 integer and value of the + second expression is a positive Signed8 integer. +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, int:Unsigned32, additive-expr + +function init() { + int:Unsigned32 startIndex = 1; + int:Signed8 endIndex = 10; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a Unsigned32 integer and value of the + second expression is a positive Signed16 integer. +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed16, int:Unsigned32, additive-expr + +function init() { + int:Unsigned32 startIndex = 1; + int:Signed16 endIndex = 10; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a Unsigned32 integer and value of the + second expression is a positive Signed32 integer. +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed32, int:Unsigned32, additive-expr + +function init() { + int:Unsigned32 startIndex = 1; + int:Signed32 endIndex = 10; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a Unsigned32 integer and value of the + second expression is a Unsigned8 integer. +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Unsigned8, int:Unsigned32, additive-expr + +function init() { + int:Unsigned32 startIndex = 1; + int:Unsigned8 endIndex = 10; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a Unsigned32 integer and value of the + second expression is a byte. +Fail-Issue: ballerina-platform/ballerina-lang#33139 +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Unsigned32, byte, additive-expr + +function init() { + int:Unsigned32 startIndex = 1; + byte endIndex = 10; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression when value of the first expression is a Unsigned32 integer and value of the + second expression is a Unsigned16 integer. +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Unsigned16, int:Unsigned32, additive-expr + +function init() { + int:Unsigned32 startIndex = 1; + int:Unsigned16 endIndex = 10; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression when values of expressions are of user-defined subtypes of int. +Fail-Issue: ballerina-platform/ballerina-lang#33139 +Labels: range-expr, iterable-inclusive, int, DecimalNumber, singleton-type, union-type, module-type-decl, + additive-expr + +type Ints 1|10; + +function init() { + Ints startIndex = 1; + Ints endIndex = 10; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression when values of expressions are of union of int subtypes. +Fail-Issue: ballerina-platform/ballerina-lang#33139 +Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, int:Unsigned32, union-type, additive-expr + +function init() { + int:Signed8|int:Unsigned32 startIndex = 1; + int:Signed8|int:Unsigned32 endIndex = 10; + int count = 0; + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression when the value of the first expression and the value of the second expression + is equal. +Labels: range-expr, iterable-inclusive, int, DecimalNumber, additive-expr + +function init() { + int startIndex = 5; + int endIndex = 5; + int count = 0; + + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 1 +} + +Test-Case: output +Description: Test range expression when the value of the first expression is less than the + value of the second expression. +Labels: range-expr, iterable-inclusive, int, DecimalNumber, additive-expr + +function init() { + int startIndex = 5; + int endIndex = 3; + int count = 0; + + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 0 +} + +Test-Case: output +Description: Test range expression when the types expressions are inferred. +Labels: range-expr, iterable-inclusive, int, DecimalNumber, additive-expr, var + +function init() { + var startIndex = 1; + var endIndex = 10; + int count = 0; + + foreach int i in startIndex...endIndex { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test field and member access as expressions in range expression. +Labels: range-expr, iterable-inclusive, array-type, DecimalNumber, field-access-expr, int, list-constructor, + mapping-constructor, member-access-expr, module-type-defn, record-type + +type Record record { + int x; +}; + +function init() { + Record c = {x: 10}; + int[] d = [30, 40]; + int count = 0; + + foreach int i in c.x...d[0] { + count = count + 1; + } + io:println(count); // @output 21 +} + +Test-Case: output +Description: Test function and method call as expressions in range expression. +Labels: range-expr, iterable-inclusive, DecimalNumber, int, explicit-new-expr, function-call-expr + module-class-defn, method-call-expr + +class Class { + function getInt() returns int { + return 1; + } +} + +function init() { + Class cls = new Class(); + int count = 0; + + foreach int i in cls.getInt()...getInt() { + count = count + 1; + } + io:println(count); // @output 10 +} + +function getInt() returns int { + return 10; +} + +Test-Case: output +Description: Test type cast expression as expressions in range expression. +Labels: range-expr, iterable-inclusive, DecimalNumber, int, type-cast-expr + +function init() { + int count = 0; + + foreach int i in 1.0...10.0 { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test unary expressions as expressions in range expression. +Labels: range-expr, iterable-inclusive, DecimalNumber, int, unary-complement, unary-minus, unary-plus + +function init() { + int count = 0; + + foreach int i in -10...+2 { + count = count + 1; + } + io:println(count); // @output 13 + + count = 0; + foreach int i in -10...~2 { + count = count + 1; + } + io:println(count); // @output 8 +} + +Test-Case: output +Description: Test additive expression as expressions in range expression. +Labels: range-expr, iterable-inclusive, additive-expr, int, DecimalNumber + +function init() { + int count = 0; + + foreach int i in 0+1...12-2 { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test multiplicative expressions as expressions in range expression. +Labels: range-expr, iterable-inclusive, DecimalNumber, int, multiplicative-expr + +function init() { + int count = 0; + + foreach int i in 1*2...36/4 { + count = count + 1; + } + io:println(count); // @output 8 + + count = 0; + foreach int i in 34%5...4*5 { + count = count + 1; + } + io:println(count); // @output 17 +} + +Test-Case: output +Description: Test binary bitwise expressions as expressions in range expression. +Labels: range-expr, iterable-inclusive, binary-bitwise-expr, DecimalNumber, int + +function init() { + int count = 0; + + foreach int i in (1&2)...(4|8) { + count = count + 1; + } + io:println(count); // @output 13 + + count = 0; + foreach int i in (6|3)...(2^8) { + count = count + 1; + } + io:println(count); // @output 4 +} + +Test-Case: output +Description: Test checking expressions as expressions in range expression. +Labels: range-expr, iterable-inclusive, check, checkpanic DecimalNumber, error, int, union-type + +function init() returns error? { + int|error startIndex = 2; + int|error endIndex = 12; + int count = 0; + + foreach int i in check startIndex...checkpanic endIndex { + count = count + 1; + } + io:println(count); // @output 11 +} + +Test-Case: output +Description: Test let expression as expressions in range expression. +Labels: range-expr, iterable-inclusive, DecimalNumber, int, let-expr + +function init() { + int count = 0; + + foreach int i in (let int h1 = 10 in h1)...(let int h1 = 25 in h1) { + count = count + 1; + } + io:println(count); // @output 16 +} + +Test-Case: output +Description: Test shift expressions as expressions in range expression. +Labels: range-expr, iterable-inclusive, DecimalNumber, int, shift-expr + +function init() { + int count = 0; + + foreach int i in 1 << 2...100 >> 4 { + count = count + 1; + } + io:println(count); // @output 3 +} + +Test-Case: output +Description: Test conditional expressions as expressions in range expression. +Labels: range-expr, iterable-inclusive, conditional-expr, DecimalNumber, error, int, nil-literal, + optional-type, union-type + +function init() { + int|error a = 10; + int? b = (); + int count = 0; + + foreach int i in (a is error ? 5 : a)...(b ?: 25) { + count = count + 1; + } + io:println(count); // @output 16 +} + +Test-Case: output +Description: Test lang.int constants as expressions in range expression. +Labels: range-expr, iterable-inclusive, int, int:SIGNED8_MAX_VALUE, int:UNSIGNED8_MAX_VALUE + +function init() { + int count = 0; + + foreach int i in int:SIGNED8_MAX_VALUE...int:UNSIGNED8_MAX_VALUE { + count = count + 1; + } + io:println(count); // @output 129 +} + +Test-Case: output +Description: Test range expression with iterable object when values of expressions are positive integers +Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, record-type, optional-type + +function init() { + int startIndex = 0; + int endIndex = 6; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ... endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 7 +} + +Test-Case: output +Description: Test range expression with iterable object when values of expressions are negative integers +Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, record-type, optional-type, unary-minus + +function init() { + int startIndex = -6; + int endIndex = -1; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ... endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 6 +} + +Test-Case: output +Description: Test range expression with iterable object when values of expressions are integers +Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, record-type, optional-type, unary-minus + +function init() { + int startIndex = -10; + int endIndex = 20; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ... endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 31 +} + +Test-Case: output +Description: Test range expression with iterable object when values of both expressions are integers +Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, record-type, optional-type, unary-minus + +function init() { + int startIndex = -7635315; + int endIndex = 964732; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ... endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 8600048 +} + +Test-Case: output +Description: Test range expression with iterable object when values of expressions are positive Signed8 integers +Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, int:Signed8, additive-expr, + record-type, optional-type + +function init() { + int:Signed8 startIndex = 1; + int:Signed8 endIndex = 10; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ... endIndex; + + int count = 0; + foreach int i in range { + count += 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression with iterable object when values of expressions are negative Signed8 integers +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, additive-expr, + record-type, optional-type, unary-minus + +function init() { + int:Signed8 startIndex = -10; + int:Signed8 endIndex = -1; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression with iterable object when values of expressions are Signed8 integers +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, additive-expr, + record-type, optional-type, unary-minus + +function init() { + int:Signed8 startIndex = -10; + int:Signed8 endIndex = 2; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 13 +} + +Test-Case: output +Description: Test range expression with iterable object when values of expressions are positive Signed16 integers +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, + record-type, optional-type + +function init() { + int:Signed16 startIndex = 1; + int:Signed16 endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression with iterable object when values of expressions are negative Signed16 integers +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, record-type, + optional-type, unary-minus + +function init() { + int:Signed16 startIndex = -10; + int:Signed16 endIndex = -1; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression with iterable object when values of expressions are Signed16 integers +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, record-type, + optional-type, unary-minus + +function init() { + int:Signed16 startIndex = -10; + int:Signed16 endIndex = 20; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 31 +} + +Test-Case: output +Description: Test range expression with iterable object when values of expressions are positive Signed32 integers +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, record-type, + optional-type + +function init() { + int:Signed32 startIndex = 1; + int:Signed32 endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression with iterable object when values of expressions are negative Signed32 integers +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, record-type, + optional-type, unary-minus + +function init() { + int:Signed32 startIndex = -10; + int:Signed32 endIndex = -1; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression with iterable object when values of expressions are Signed32 integers +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, record-type, + optional-type, unary-minus + +function init() { + int:Signed32 startIndex = -10; + int:Signed32 endIndex = 20; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 31 +} + +Test-Case: output +Description: Test range expression with iterable object when values of expressions are Unsigned8 integers +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, additive-expr, record-type, + optional-type + +function init() { + int:Unsigned8 startIndex = 1; + int:Unsigned8 endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression with iterable object when values of expressions are Unsigned16 integers +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, additive-expr, record-type, + optional-type, unary-minus + +function init() { + int:Unsigned16 startIndex = 1; + int:Unsigned16 endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression with iterable object when values of expressions are Unsigned32 integers +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, additive-expr, record-type, + optional-type, unary-minus + +function init() { + int:Unsigned32 startIndex = 1; + int:Unsigned32 endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a positive integer + and value of the second expression is a positive Signed8 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, additive-expr, record-type, + optional-type + +function init() { + int startIndex = 1; + int:Signed8 endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a negative integer and value of the + second expression is a negative Signed8 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, additive-expr, record-type, + optional-type, unary-minus + +function init() { + int startIndex = -10; + int:Signed8 endIndex = -1; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a negative integer and value of the + second expression is a positive Signed8 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, additive-expr, record-type, + optional-type, unary-minus + +function init() { + int startIndex = -10; + int:Signed8 endIndex = 2; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 13 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a positive integer and value of the + second expression is a positive Signed16 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, record-type, + optional-type + +function init() { + int startIndex = 1; + int:Signed16 endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a negative integer and value of the + second expression is a negative Signed16 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, record-type, + optional-type, unary-minus + +function init() { + int startIndex = -10; + int:Signed16 endIndex = -1; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a negative integer and value of the + second expression is a positive Signed16 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, record-type, + optional-type, unary-minus + +function init() { + int startIndex = -10; + int:Signed16 endIndex = 2; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 13 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a positive integer and value of the + second expression is a positive Signed32 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, record-type, + optional-type + +function init() { + int startIndex = 1; + int:Signed32 endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a negative integer + and value of the second expression is a negative Signed32 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, record-type, + optional-type, unary-minus + +function init() { + int startIndex = -10; + int:Signed32 endIndex = -1; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a negative integer and value of the + second expression is a positive Signed32 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, record-type, + optional-type, unary-minus + +function init() { + int startIndex = -10; + int:Signed32 endIndex = 2; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 13 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a positive integer and value of the + second expression is a Unsigned8 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, additive-expr, record-type, + optional-type + +function init() { + int startIndex = 1; + int:Unsigned8 endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a negative integer and value of the + second expression is a Unsigned8 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, additive-expr, record-type, + optional-type, unary-minus + +function init() { + int startIndex = -10; + int:Unsigned8 endIndex = 2; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 13 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a positive integer and value of the + second expression is a byte. +Fail-Issue: ballerina-platform/ballerina-lang#33139 +Labels: range-expr, iterable-object, int, DecimalNumber, byte, additive-expr, record-type, optional-type + +function init() { + int startIndex = 1; + byte endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a negative integer + and value of the second expression is a byte. +Fail-Issue: ballerina-platform/ballerina-lang#33139 +Labels: range-expr, iterable-object, int, DecimalNumber, byte, additive-expr, record-type, optional-type, unary-minus + +function init() { + int startIndex = -10; + byte endIndex = 2; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 13 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a positive integer + and value of the second expression is a Unsigned16 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, additive-expr, record-type, optional-type + +function init() { + int startIndex = 1; + int:Unsigned16 endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a negative integer + and value of the second expression is a Unsigned16 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, additive-expr, record-type, optional-type, + unary-minus + +function init() { + int startIndex = -10; + int:Unsigned16 endIndex = 2; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 13 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a positive integer + and value of the second expression is a Unsigned32 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, additive-expr, record-type, optional-type + +function init() { + int startIndex = 1; + int:Unsigned32 endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a negative integer + and value of the second expression is a Unsigned32 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, additive-expr, record-type, optional-type, + unary-minus + +function init() { + int startIndex = -10; + int:Unsigned32 endIndex = 2; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 13 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a positive Signed8 + integer and value of the second expression is a positive integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, additive-expr, record-type, optional-type + +function init() { + int:Signed8 startIndex = 1; + int endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a negative Signed8 + integer and value of the second expression is a negative integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, additive-expr, record-type, optional-type, + unary-minus + +function init() { + int:Signed8 startIndex = -10; + int endIndex = -1; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a negative Signed8 + integer and value of the second expression is a positive integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, additive-expr, record-type, optional-type, + unary-minus + +function init() { + int:Signed8 startIndex = -10; + int endIndex = 2; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 13 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a positive Signed8 + integer and value of the second expression is a positive Signed16 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Signed16, additive-expr, record-type, + optional-type + +function init() { + int:Signed8 startIndex = 1; + int:Signed16 endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a negative Signed8 + integer and value of the second expression is a negative Signed16 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Signed16, additive-expr, record-type, + optional-type, unary-minus + +function init() { + int:Signed8 startIndex = -10; + int:Signed16 endIndex = -1; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a negative Signed8 + integer and value of the second expression is a positive Signed16 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Signed16, additive-expr, record-type, + optional-type, unary-minus + +function init() { + int:Signed8 startIndex = -10; + int:Signed16 endIndex = 2; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 13 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a positive Signed8 + integer and value of the second expression is a positive Signed32 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Signed32, additive-expr, record-type, + optional-type + +function init() { + int:Signed8 startIndex = 1; + int:Signed32 endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a negative Signed8 + integer and value of the second expression is a negative Signed32 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Signed32, additive-expr, record-type, + optional-type, unary-minus + +function init() { + int:Signed8 startIndex = -10; + int:Signed32 endIndex = -1; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a negative Signed8 + integer and value of the second expression is a positive Signed32 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Signed32, additive-expr, record-type, + optional-type, unary-minus + +function init() { + int:Signed8 startIndex = -10; + int:Signed32 endIndex = 2; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 13 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a positive Signed8 + integer and value of the second expression is a Unsigned8 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Unsigned8, additive-expr, record-type, + optional-type + +function init() { + int:Signed8 startIndex = 1; + int:Unsigned8 endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a negative Signed8 + integer and value of the second expression is a Unsigned8 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Unsigned8, additive-expr, record-type, + optional-type, unary-minus + +function init() { + int:Signed8 startIndex = -10; + int:Unsigned8 endIndex = 2; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 13 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a positive Signed8 integer and value of the + second expression is a byte. +Fail-Issue: ballerina-platform/ballerina-lang#33139 +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, byte, additive-expr, record-type, + optional-type + +function init() { + int:Signed8 startIndex = 1; + byte endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a negative Signed8 + integer and value of the second expression is a byte. +Fail-Issue: ballerina-platform/ballerina-lang#33139 +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, byte, additive-expr, record-type, + optional-type, unary-minus + +function init() { + int:Signed8 startIndex = -10; + byte endIndex = 2; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 13 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a positive Signed8 + integer and value of the second expression is a Unsigned16 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Unsigned16, additive-expr, record-type, + optional-type + +function init() { + int:Signed8 startIndex = 1; + int:Unsigned16 endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a negative Signed8 + integer and value of the second expression is a Unsigned16 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Unsigned16, additive-expr, record-type, + optional-type, unary-minus + +function init() { + int:Signed8 startIndex = -10; + int:Unsigned16 endIndex = 2; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 13 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a positive Signed8 integer and value of the + second expression is a Unsigned32 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Unsigned32, additive-expr, record-type, + optional-type + +function init() { + int:Signed8 startIndex = 1; + int:Unsigned32 endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a negative Signed8 + integer and value of the second expression is a Unsigned32 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Unsigned32, additive-expr, record-type, + optional-type, unary-minus + +function init() { + int:Signed8 startIndex = -10; + int:Unsigned32 endIndex = 2; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 13 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a positive Signed16 + integer and value of the second expression is a positive integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, record-type, optional-type + +function init() { + int:Signed16 startIndex = 1; + int endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a negative Signed16 + integer and value of the second expression is a negative integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, record-type, optional-type, + unary-minus + +function init() { + int:Signed16 startIndex = -10; + int endIndex = -1; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a negative Signed16 + integer and value of the second expression is a positive integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, record-type, optional-type, + unary-minus + +function init() { + int:Signed16 startIndex = -10; + int endIndex = 2; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 13 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a positive Signed16 + integer and value of the second expression is a positive Signed8 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Signed8, additive-expr, record-type, + optional-type + +function init() { + int:Signed16 startIndex = 1; + int:Signed8 endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a negative Signed16 + integer and value of the second expression is a negative Signed8 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Signed8, additive-expr, record-type, + optional-type, unary-minus + +function init() { + int:Signed16 startIndex = -10; + int:Signed8 endIndex = -1; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a negative Signed16 + integer and value of the second expression is a positive Signed8 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Signed8, additive-expr, record-type, + optional-type, unary-minus + +function init() { + int:Signed16 startIndex = -10; + int:Signed8 endIndex = 2; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 13 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a positive Signed16 + integer and value of the second expression is a positive Signed32 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Signed32, additive-expr, record-type, + optional-type + +function init() { + int:Signed16 startIndex = 1; + int:Signed32 endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a negative Signed16 + integer and value of the second expression is a negative Signed32 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Signed32, additive-expr, record-type, + optional-type, unary-minus + +function init() { + int:Signed16 startIndex = -10; + int:Signed32 endIndex = -1; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a negative Signed16 + integer and value of the second expression is a positive Signed32 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Signed32, additive-expr, record-type, + optional-type, unary-minus + +function init() { + int:Signed16 startIndex = -10; + int:Signed32 endIndex = 2; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 13 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a positive Signed16 + integer and value of the second expression is a Unsigned8 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Unsigned8, additive-expr, record-type, + optional-type + +function init() { + int:Signed16 startIndex = 1; + int:Unsigned8 endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a negative Signed16 + integer and value of the second expression is a Unsigned8 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Unsigned8, additive-expr, record-type, + optional-type, unary-minus + +function init() { + int:Signed16 startIndex = -10; + int:Unsigned8 endIndex = 2; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 13 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a positive Signed16 + integer and value of the second expression is a byte. +Fail-Issue: ballerina-platform/ballerina-lang#33139 +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, byte, additive-expr, record-type, + optional-type + +function init() { + int:Signed16 startIndex = 1; + byte endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a negative Signed16 + integer and value of the second expression is a byte. +Fail-Issue: ballerina-platform/ballerina-lang#33139 +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, byte, additive-expr, record-type, + optional-type, unary-minus + +function init() { + int:Signed16 startIndex = -10; + byte endIndex = 2; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 13 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a positive Signed16 + integer and value of the second expression is a Unsigned16 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Unsigned16, additive-expr, record-type, + optional-type + +function init() { + int:Signed16 startIndex = 1; + int:Unsigned16 endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a negative Signed16 + integer and value of the second expression is a Unsigned16 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Unsigned16, additive-expr, record-type, + optional-type, unary-minus + +function init() { + int:Signed16 startIndex = -10; + int:Unsigned16 endIndex = 2; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 13 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a positive Signed16 + integer and value of the second expression is a Unsigned32 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Unsigned32, additive-expr, record-type, + optional-type + +function init() { + int:Signed16 startIndex = 1; + int:Unsigned32 endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a negative Signed16 + integer and value of the second expression is a Unsigned32 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Unsigned32, additive-expr, record-type, + optional-type, unary-minus + +function init() { + int:Signed16 startIndex = -10; + int:Unsigned32 endIndex = 2; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 13 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a positive Signed32 + integer and value of the second expression is a positive integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, record-type, optional-type + +function init() { + int:Signed32 startIndex = 1; + int endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a negative Signed32 + integer and value of the second expression is a negative integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, record-type, optional-type, + unary-minus + +function init() { + int:Signed32 startIndex = -10; + int endIndex = -1; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a negative Signed32 + integer and value of the second expression is a positive integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, record-type, optional-type, + unary-minus + +function init() { + int:Signed32 startIndex = -10; + int endIndex = 2; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 13 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a positive Signed32 + integer and value of the second expression is a positive Signed8 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Signed8, additive-expr, record-type, + optional-type + +function init() { + int:Signed32 startIndex = 1; + int:Signed8 endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a negative Signed32 + integer and value of the second expression is a negative Signed8 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Signed8, additive-expr, record-type, + optional-type, unary-minus + +function init() { + int:Signed32 startIndex = -10; + int:Signed8 endIndex = -1; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a negative Signed32 + integer and value of the second expression is a positive Signed8 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Signed8, additive-expr, record-type, + optional-type, unary-minus + +function init() { + int:Signed32 startIndex = -10; + int:Signed8 endIndex = 2; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 13 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a positive Signed32 + integer and value of the second expression is a positive Signed16 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Signed16, additive-expr, record-type, + optional-type + +function init() { + int:Signed32 startIndex = 1; + int:Signed16 endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a negative Signed32 + integer and value of the second expression is a negative Signed16 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Signed16, additive-expr, record-type, + optional-type, unary-minus + +function init() { + int:Signed32 startIndex = -10; + int:Signed16 endIndex = -1; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a negative Signed32 + integer and value of the second expression is a positive Signed16 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Signed16, additive-expr, record-type, + optional-type, unary-minus + +function init() { + int:Signed32 startIndex = -10; + int:Signed16 endIndex = 2; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 13 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a positive Signed32 + integer and value of the second expression is a Unsigned8 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Unsigned8, additive-expr, record-type, + optional-type + +function init() { + int:Signed32 startIndex = 1; + int:Unsigned8 endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a negative Signed32 + integer and value of the second expression is a Unsigned8 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Unsigned8, additive-expr, record-type, + optional-type, unary-minus + +function init() { + int:Signed32 startIndex = -10; + int:Unsigned8 endIndex = 2; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 13 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a positive Signed32 + integer and value of the second expression is a byte. +Fail-Issue: ballerina-platform/ballerina-lang#33139 +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, bye, additive-expr, record-type, + optional-type + +function init() { + int:Signed32 startIndex = 1; + byte endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a negative Signed32 + integer and value of the second expression is a byte. +Fail-Issue: ballerina-platform/ballerina-lang#33139 +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, byte, additive-expr, record-type, + optional-type, unary-minus + +function init() { + int:Signed32 startIndex = -10; + byte endIndex = 2; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 13 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a positive Signed32 + integer and value of the second expression is a Unsigned16 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Unsigned16, additive-expr, record-type, + optional-type + +function init() { + int:Signed32 startIndex = 1; + int:Unsigned16 endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a negative Signed32 + integer and value of the second expression is a Unsigned16 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Unsigned16, additive-expr, record-type, + optional-type, unary-minus + +function init() { + int:Signed32 startIndex = -10; + int:Unsigned16 endIndex = 2; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 13 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a positive Signed32 + integer and value of the second expression is a Unsigned32 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Unsigned32, additive-expr, record-type, + optional-type + +function init() { + int:Signed32 startIndex = 1; + int:Unsigned32 endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a negative Signed32 + integer and value of the second expression is a Unsigned32 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Unsigned32, additive-expr, record-type, + optional-type, unary-minus + +function init() { + int:Signed32 startIndex = -10; + int:Unsigned32 endIndex = 2; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 13 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a Unsigned8 + integer and value of the second expression is a positive integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, additive-expr, record-type, optional-type + +function init() { + int:Unsigned8 startIndex = 1; + int endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a Unsigned8 + integer and value of the second expression is a positive Signed8 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, int:Signed8, additive-expr, record-type, + optional-type + +function init() { + int:Unsigned8 startIndex = 1; + int:Signed8 endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a Unsigned8 + integer and value of the second expression is a positive Signed16 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, int:Signed16, additive-expr, record-type, + optional-type + +function init() { + int:Unsigned8 startIndex = 1; + int:Signed16 endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a Unsigned8 + integer and value of the second expression is a positive Signed32 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, int:Signed32, additive-expr, record-type, + optional-type + +function init() { + int:Unsigned8 startIndex = 1; + int:Signed32 endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a Unsigned8 + integer and value of the second expression is a byte. +Fail-Issue: ballerina-platform/ballerina-lang#33139 +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, byte, additive-expr, record-type, + optional-type + +function init() { + int:Unsigned8 startIndex = 1; + byte endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a Unsigned8 + integer and value of the second expression is a Unsigned16 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, int:Unsigned16, additive-expr, record-type, + optional-type + +function init() { + int:Unsigned8 startIndex = 1; + int:Unsigned16 endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a Unsigned8 + integer and value of the second expression is a Unsigned32 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, int:Unsigned32, additive-expr, record-type, + optional-type + +function init() { + int:Unsigned8 startIndex = 1; + int:Unsigned32 endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a Unsigned16 + integer and value of the second expression is a positive integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, additive-expr, record-type, optional-type + +function init() { + int:Unsigned16 startIndex = 1; + int endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a Unsigned16 + integer and value of the second expression is a positive Signed8 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, int:Signed8, additive-expr, record-type, + optional-type + +function init() { + int:Unsigned16 startIndex = 1; + int:Signed8 endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a Unsigned16 + integer and value of the second expression is a positive Signed16 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, int:Signed16, additive-expr, record-type, + optional-type + +function init() { + int:Unsigned16 startIndex = 1; + int:Signed16 endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a Unsigned16 + integer and value of the second expression is a positive Signed32 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, int:Signed32, additive-expr, record-type, + optional-type + +function init() { + int:Unsigned16 startIndex = 1; + int:Signed32 endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a Unsigned16 + integer and value of the second expression is a Unsigned8 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, int:Unsigned8, additive-expr, record-type, + optional-type + +function init() { + int:Unsigned16 startIndex = 1; + int:Unsigned8 endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a Unsigned16 integer + and value of the second expression is a byte. +Fail-Issue: ballerina-platform/ballerina-lang#33139 +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, byte, additive-expr, record-type, + optional-type + +function init() { + int:Unsigned16 startIndex = 1; + byte endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a Unsigned16 + integer and value of the second expression is a Unsigned32 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, int:Unsigned32, additive-expr, record-type, + optional-type + +function init() { + int:Unsigned16 startIndex = 1; + int:Unsigned32 endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a Unsigned32 + integer and value of the second expression is a positive integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, additive-expr, record-type, optional-type + +function init() { + int:Unsigned32 startIndex = 1; + int endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a Unsigned32 + integer and value of the second expression is a positive Signed8 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, int:Signed8, additive-expr, record-type, + optional-type + +function init() { + int:Unsigned32 startIndex = 1; + int:Signed8 endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a Unsigned32 + integer and value of the second expression is a positive Signed16 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, int:Signed16, additive-expr, record-type, + optional-type + +function init() { + int:Unsigned32 startIndex = 1; + int:Signed16 endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a Unsigned32 + integer and value of the second expression is a positive Signed32 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, int:Signed32, additive-expr, record-type, + optional-type + +function init() { + int:Unsigned32 startIndex = 1; + int:Signed32 endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a Unsigned32 + integer and value of the second expression is a Unsigned8 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, int:Unsigned8, additive-expr, record-type, + optional-type + +function init() { + int:Unsigned32 startIndex = 1; + int:Unsigned8 endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a Unsigned32 + integer and value of the second expression is a byte. +Fail-Issue: ballerina-platform/ballerina-lang#33139 +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, byte, additive-expr, record-type, + optional-type + +function init() { + int:Unsigned32 startIndex = 1; + byte endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression with iterable object when value of the first expression is a Unsigned32 + integer and value of the second expression is a Unsigned16 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, int:Unsigned16, additive-expr, record-type, + optional-type + +function init() { + int:Unsigned32 startIndex = 1; + int:Unsigned16 endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression with iterable object when values of expressions are of user-defined subtypes of int. +Fail-Issue: ballerina-platform/ballerina-lang#33139 +Labels: range-expr, iterable-object, int, DecimalNumber, singleton-type, union-type, module-type-decl, + additive-expr, record-type, optional-type + +type Ints 1|10; + +function init() { + Ints startIndex = 1; + Ints endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression with iterable object when values of expressions are of union of int subtypes. +Fail-Issue: ballerina-platform/ballerina-lang#33139 +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Unsigned32, union-type, additive-expr, + record-type, optional-type + +function init() { + int:Signed8|int:Unsigned32 startIndex = 1; + int:Signed8|int:Unsigned32 endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression with iterable object when the value of the first expression and the value of the + second expression is equal. +Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, record-type, optional-type + +function init() { + int startIndex = 5; + int endIndex = 5; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 1 +} + +Test-Case: output +Description: Test range expression when the value of the first expression is less than the + value of the second expression. +Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, record-type, optional-type + +function init() { + int startIndex = 5; + int endIndex = 3; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 0 +} + +Test-Case: output +Description: Test range expression with iterable object when the types of the values of the expressions are inferred. +Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, record-type, optional-type, var + +function init() { + var startIndex = 1; + var endIndex = 10; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression when the types of the values of the expressions and type of the range + expression are inferred. +Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, var + +function init() { + int startIndex = 1; + int endIndex = 10; + int count = 0; + + var range = startIndex...endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression at module level. +Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, record-type, optional-type, var + +int startIndex = 1; +int endIndex = 10; + +object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; +} range = startIndex...endIndex; + +function init() { + int count = 0; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test range expression at module level. +Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, var + +int startIndex = 1; +int endIndex = 10; + +var range = startIndex...endIndex; + +function init() { + int count = 0; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test iterable object returned by the range expression. +Labels: range-expr, int, DecimalNumber, object-type, optional-type, var, value:toBalString + +function init() { + object { + public isolated function iterator() returns (object { + public isolated function next() returns (record {|int value;|}?); + }); + } range = 1...3; + + var iterator = range.iterator(); + + record {| int value; |}? rec = iterator.next(); + io:println(rec); // @output {"value":1} + io:println(rec?.value); // @output 1 + + rec = iterator.next(); + io:println(rec); // @output {"value":2} + io:println(rec?.value); // @output 2 + + rec = iterator.next(); + io:println(rec); // @output {"value":3} + io:println(rec?.value); // @output 3 + + rec = iterator.next(); + io:println(rec.toBalString()); // @output () + io:println(rec?.value.toBalString()); // @output () +} + +Test-Case: output +Description: Test field and member access as expressions in range expression. +Labels: range-expr, iterable-object, array-type, DecimalNumber, field-access-expr, int, list-constructor, + mapping-constructor, member-access-expr, module-type-defn, record-type, optional-type + +type Record record { + int x; +}; + +function init() { + Record c = {x: 10}; + int[] d = [30, 40]; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = c.x...d[0]; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 21 +} + +Test-Case: output +Description: Test function and method call as expressions in range expression. +Labels: range-expr, iterable-object, DecimalNumber, int, explicit-new-expr, function-call-expr + module-class-defn, method-call-expr, record-type, optional-type + +class Class { + function getInt() returns int { + return 1; + } +} + +function init() { + Class cls = new Class(); + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = cls.getInt()...getInt(); + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 10 +} + +function getInt() returns int { + return 10; +} + +Test-Case: output +Description: Test type cast expression as expressions in range expression. +Labels: range-expr, iterable-object, DecimalNumber, int, type-cast-expr, record-type, optional-type + +function init() { + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = 1.0...10.0; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test unary expressions as expressions in range expression. +Labels: range-expr, iterable-object, DecimalNumber, int, unary-complement, unary-minus, unary-plus, + record-type, optional-type + +function init() { + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = -10...+2; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 13 + + count = 0; + range = -10...~2; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 8 +} + +Test-Case: output +Description: Test additive expression as expressions in range expression. +Labels: range-expr, iterable-object, additive-expr, int, DecimalNumber, record-type, optional-type + +function init() { + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = 0+1...12-2; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 10 +} + +Test-Case: output +Description: Test multiplicative expressions as expressions in range expression. +Labels: range-expr, iterable-object, DecimalNumber, int, multiplicative-expr, record-type, optional-type + +function init() { + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = 1*2...36/4; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 8 + + count = 0; + range = 34%5...4*5; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 17 +} + +Test-Case: output +Description: Test binary bitwise expressions as expressions in range expression. +Labels: range-expr, iterable-object, binary-bitwise-expr, DecimalNumber, int, record-type, optional-type + +function init() { + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = (1&2)...(4|8); + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 13 + + count = 0; + range = (6|3)...(2^8); + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 4 +} + +Test-Case: output +Description: Test checking expressions as expressions in range expression. +Labels: range-expr, iterable-object, check, checkpanic DecimalNumber, error, int, union-type, + record-type, optional-type + +function init() returns error? { + int|error startIndex = 2; + int|error endIndex = 12; + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = check startIndex...checkpanic endIndex; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 11 +} + +Test-Case: output +Description: Test let expression as expressions in range expression. +Labels: range-expr, iterable-object, DecimalNumber, int, let-expr, record-type, optional-type + +function init() { + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = (let int h1 = 10 in h1)...(let int h1 = 25 in h1); + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 16 +} + +Test-Case: output +Description: Test shift expressions as expressions in range expression. +Labels: range-expr, iterable-object, DecimalNumber, int, shift-expr, record-type, optional-type + +function init() { + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = 1<<2...100>>4; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 3 +} + +Test-Case: output +Description: Test conditional expressions as expressions in range expression. +Labels: range-expr, iterable-object, conditional-expr, DecimalNumber, error, int, nil-literal, + optional-type, union-type, record-type + +function init() { + int|error a = 10; + int? b = (); + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = (a is error ? 5 : a)...(b ?: 25); + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 16 +} + + +Test-Case: output +Description: Test lang.int constants as expressions in range expression. +Labels: range-expr, iterable-object, int, int:SIGNED8_MAX_VALUE, int:UNSIGNED8_MAX_VALUE, + record-type, optional-type + +function init() { + int count = 0; + + object { + *object:Iterable; + public function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = int:SIGNED8_MAX_VALUE...int:UNSIGNED8_MAX_VALUE; + + foreach int i in range { + count = count + 1; + } + io:println(count); // @output 129 +} + +Test-Case: output +Description: Test isolatedness of range expression. +Fail-Issue: ballerina-platform/ballerina-lang#33139 not isolated? prints false +Labels: range-expr, iterable-object, object-type, record-type, optional-type + +function init() { + object { + *object:Iterable; + public function iterator() returns object { + public function next() returns (record {|int value;|}?); + }; + } range = 1...10; + + io:println(range is isolated object {}); // @output true +} + +Test-Case: output +Description: Test range expression with query expression. +Labels: range-expr, array-type, int, DecimalNumber, query-expr + +function init() { + int[] a = from int i in 1...10 + select i; + + io:println(a); // @output [1,2,3,4,5,6,7,8,9,10] +} + +Test-Case: error +Description: Test range expression when static type of either of the expression is not a subtype of int. +Labels: range-expr, int, DecimalFloatingPointNumber, string + +function init() { + _ = 1.0 ... 10; // @error ... not defined as static type of first expression is not a subtype of int + _ = 1 ... 10.0; // @error ... not defined as static type of second expression is not a subtype of int + _ = 1.0 ... 10.0; // @error ... not defined as static type of both expressions are not subtypes of int + + _ = "1" ... 10; // @error ... not defined as static type of first expression is not a subtype of int + _ = 1 ... "10"; // @error ... not defined as static type of second expression is not a subtype of int + _ = "1" ... "10"; // @error ... not defined as static type of both expressions are not subtypes of int +} + +Test-Case: error +Description: Test assigning the result of range expression to an incompatible type. +Labels: range-expr, int, DecimalNumber, object-type + +function init() { + int _ = 1 ... 10; // @error result of a range expression is an object + + object { + public isolated function iterator() returns (object { + public isolated function next() returns (record {|float value;|}?); + }); + } _ = 1 ... 10; // @error next() of range expression's iterable object returns a record {|int value;|} +} + +Test-Case: error +Description: Test assigning the result of range expression to an incompatible type when the static + type of the range expression is inferred. +Labels: range-expr, int, DecimalNumber, object-type, var, record-type, optional-type + +function init() { + var a = 1 ... 10; + + int _ = a; // @error result of a range expression is an object + + object { + public isolated function iterator() returns (object { + public isolated function next() returns (record {|float value;|}?); + }); + } _ = a; // @error next() of range expression's iterable object returns a record {|int value;|} +} From 39073e7799cd3260388221f839930b25f83b0729 Mon Sep 17 00:00:00 2001 From: lasinicl Date: Wed, 13 Oct 2021 06:53:28 +0530 Subject: [PATCH 02/14] Improve tests --- .../range-expr/range_expr_exclusive.balt | 976 +++++++------ .../range-expr/range_expr_inclusive.balt | 1232 +++++++++-------- 2 files changed, 1169 insertions(+), 1039 deletions(-) diff --git a/conformance/lang/expressions/range-expr/range_expr_exclusive.balt b/conformance/lang/expressions/range-expr/range_expr_exclusive.balt index a323e2c7..4f855e09 100644 --- a/conformance/lang/expressions/range-expr/range_expr_exclusive.balt +++ b/conformance/lang/expressions/range-expr/range_expr_exclusive.balt @@ -1,6 +1,6 @@ Test-Case: output Description: Test range expression when values of expressions are positive integers -Labels: range-expr, iterable-exclusive, int, DecimalNumber, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, additive-expr function init() { int startIndex = 0; @@ -14,7 +14,7 @@ function init() { Test-Case: output Description: Test range expression when values of expressions are negative integers -Labels: range-expr, iterable-exclusive, int, DecimalNumber, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, unary-minus, additive-expr function init() { int startIndex = -6; @@ -28,7 +28,7 @@ function init() { Test-Case: output Description: Test range expression when values of expressions are integers -Labels: range-expr, iterable-exclusive, int, DecimalNumber, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, unary-minus, additive-expr function init() { int startIndex = -10; @@ -42,7 +42,7 @@ function init() { Test-Case: output Description: Test range expression when values of both expressions are integers -Labels: range-expr, iterable-exclusive, int, DecimalNumber, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, unary-minus, additive-expr function init() { int startIndex = -7635315; @@ -56,7 +56,7 @@ function init() { Test-Case: output Description: Test range expression when values of expressions are positive Signed8 integers -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, additive-expr function init() { int:Signed8 startIndex = 1; @@ -70,7 +70,7 @@ function init() { Test-Case: output Description: Test range expression when values of expressions are negative Signed8 integers -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, unary-minus, additive-expr function init() { int:Signed8 startIndex = -10; @@ -84,7 +84,7 @@ function init() { Test-Case: output Description: Test range expression when values of expressions are Signed8 integers -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, unary-minus, additive-expr function init() { int:Signed8 startIndex = -10; @@ -98,7 +98,7 @@ function init() { Test-Case: output Description: Test range expression when values of expressions are positive Signed16 integers -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, additive-expr function init() { int:Signed16 startIndex = 1; @@ -112,7 +112,7 @@ function init() { Test-Case: output Description: Test range expression when values of expressions are negative Signed16 integers -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, unary-minus, additive-expr function init() { int:Signed16 startIndex = -10; @@ -126,7 +126,7 @@ function init() { Test-Case: output Description: Test range expression when values of expressions are Signed16 integers -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, unary-minus, additive-expr function init() { int:Signed16 startIndex = -10; @@ -140,7 +140,7 @@ function init() { Test-Case: output Description: Test range expression when values of expressions are positive Signed32 integers -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, additive-expr function init() { int:Signed32 startIndex = 1; @@ -154,7 +154,7 @@ function init() { Test-Case: output Description: Test range expression when values of expressions are negative Signed32 integers -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, unary-minus, additive-expr function init() { int:Signed32 startIndex = -10; @@ -168,7 +168,7 @@ function init() { Test-Case: output Description: Test range expression when values of expressions are Signed32 integers -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, unary-minus, additive-expr function init() { int:Signed32 startIndex = -10; @@ -182,7 +182,7 @@ function init() { Test-Case: output Description: Test range expression when values of expressions are Unsigned8 integers -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned8, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned8, additive-expr function init() { int:Unsigned8 startIndex = 1; @@ -196,7 +196,7 @@ function init() { Test-Case: output Description: Test range expression when values of expressions are Unsigned16 integers -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned16, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned16, additive-expr function init() { int:Unsigned16 startIndex = 1; @@ -210,7 +210,7 @@ function init() { Test-Case: output Description: Test range expression when values of expressions are Unsigned32 integers -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned32, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned32, additive-expr function init() { int:Unsigned32 startIndex = 1; @@ -225,7 +225,7 @@ function init() { Test-Case: output Description: Test range expression when value of the first expression is a positive integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, additive-expr function init() { int startIndex = 1; @@ -240,7 +240,7 @@ function init() { Test-Case: output Description: Test range expression when value of the first expression is a negative integer and value of the second expression is a negative Signed8 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, unary-minus, additive-expr function init() { int startIndex = -10; @@ -255,7 +255,7 @@ function init() { Test-Case: output Description: Test range expression when value of the first expression is a negative integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, unary-minus, additive-expr function init() { int startIndex = -10; @@ -270,7 +270,7 @@ function init() { Test-Case: output Description: Test range expression when value of the first expression is a positive integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, additive-expr function init() { int startIndex = 1; @@ -285,7 +285,7 @@ function init() { Test-Case: output Description: Test range expression when value of the first expression is a negative integer and value of the second expression is a negative Signed16 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, unary-minus, additive-expr function init() { int startIndex = -10; @@ -300,7 +300,7 @@ function init() { Test-Case: output Description: Test range expression when value of the first expression is a negative integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, unary-minus, additive-expr function init() { int startIndex = -10; @@ -315,7 +315,7 @@ function init() { Test-Case: output Description: Test range expression when value of the first expression is a positive integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, additive-expr function init() { int startIndex = 1; @@ -330,7 +330,7 @@ function init() { Test-Case: output Description: Test range expression when value of the first expression is a negative integer and value of the second expression is a negative Signed32 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, unary-minus, additive-expr function init() { int startIndex = -10; @@ -345,7 +345,7 @@ function init() { Test-Case: output Description: Test range expression when value of the first expression is a negative integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, unary-minus, additive-expr function init() { int startIndex = -10; @@ -360,7 +360,7 @@ function init() { Test-Case: output Description: Test range expression when value of the first expression is a positive integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned8, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned8, additive-expr function init() { int startIndex = 1; @@ -375,7 +375,7 @@ function init() { Test-Case: output Description: Test range expression when value of the first expression is a negative integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned8, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned8, unary-minus, additive-expr function init() { int startIndex = -10; @@ -391,7 +391,7 @@ Test-Case: output Description: Test range expression when value of the first expression is a positive integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-exclusive, int, DecimalNumber, byte, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, byte, additive-expr function init() { int startIndex = 1; @@ -407,7 +407,7 @@ Test-Case: output Description: Test range expression when value of the first expression is a negative integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-exclusive, int, DecimalNumber, byte, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, byte, unary-minus, additive-expr function init() { int startIndex = -10; @@ -422,7 +422,7 @@ function init() { Test-Case: output Description: Test range expression when value of the first expression is a positive integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned16, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned16, additive-expr function init() { int startIndex = 1; @@ -437,7 +437,7 @@ function init() { Test-Case: output Description: Test range expression when value of the first expression is a negative integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned16, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned16, unary-minus, additive-expr function init() { int startIndex = -10; @@ -452,7 +452,7 @@ function init() { Test-Case: output Description: Test range expression when value of the first expression is a positive integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned32, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned32, additive-expr function init() { int startIndex = 1; @@ -467,7 +467,7 @@ function init() { Test-Case: output Description: Test range expression when value of the first expression is a negative integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned32, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned32, unary-minus, additive-expr function init() { int startIndex = -10; @@ -482,7 +482,7 @@ function init() { Test-Case: output Description: Test range expression when value of the first expression is a positive Signed8 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, additive-expr function init() { int:Signed8 startIndex = 1; @@ -497,7 +497,7 @@ function init() { Test-Case: output Description: Test range expression when value of the first expression is a negative Signed8 integer and value of the second expression is a negative integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, unary-minus, additive-expr function init() { int:Signed8 startIndex = -10; @@ -512,7 +512,7 @@ function init() { Test-Case: output Description: Test range expression when value of the first expression is a negative Signed8 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, unary-minus, additive-expr function init() { int:Signed8 startIndex = -10; @@ -527,7 +527,7 @@ function init() { Test-Case: output Description: Test range expression when value of the first expression is a positive Signed8 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Signed16, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Signed16, additive-expr function init() { int:Signed8 startIndex = 1; @@ -542,7 +542,7 @@ function init() { Test-Case: output Description: Test range expression when value of the first expression is a negative Signed8 integer and value of the second expression is a negative Signed16 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Signed16, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Signed16, unary-minus, additive-expr function init() { int:Signed8 startIndex = -10; @@ -557,7 +557,7 @@ function init() { Test-Case: output Description: Test range expression when value of the first expression is a negative Signed8 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Signed16, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Signed16, unary-minus, additive-expr function init() { int:Signed8 startIndex = -10; @@ -572,7 +572,7 @@ function init() { Test-Case: output Description: Test range expression when value of the first expression is a positive Signed8 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Signed32, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Signed32, additive-expr function init() { int:Signed8 startIndex = 1; @@ -587,7 +587,7 @@ function init() { Test-Case: output Description: Test range expression when value of the first expression is a negative Signed8 integer and value of the second expression is a negative Signed32 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Signed32, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Signed32, unary-minus, additive-expr function init() { int:Signed8 startIndex = -10; @@ -602,7 +602,7 @@ function init() { Test-Case: output Description: Test range expression when value of the first expression is a negative Signed8 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Signed32, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Signed32, unary-minus, additive-expr function init() { int:Signed8 startIndex = -10; @@ -617,7 +617,7 @@ function init() { Test-Case: output Description: Test range expression when value of the first expression is a positive Signed8 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Unsigned8, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Unsigned8, additive-expr function init() { int:Signed8 startIndex = 1; @@ -632,7 +632,7 @@ function init() { Test-Case: output Description: Test range expression when value of the first expression is a negative Signed8 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Unsigned8, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Unsigned8, unary-minus, additive-expr function init() { int:Signed8 startIndex = -10; @@ -648,7 +648,7 @@ Test-Case: output Description: Test range expression when value of the first expression is a positive Signed8 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, byte, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, byte, additive-expr function init() { int:Signed8 startIndex = 1; @@ -664,7 +664,7 @@ Test-Case: output Description: Test range expression when value of the first expression is a negative Signed8 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, byte, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, byte, unary-minus, additive-expr function init() { int:Signed8 startIndex = -10; @@ -679,7 +679,7 @@ function init() { Test-Case: output Description: Test range expression when value of the first expression is a positive Signed8 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Unsigned16, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Unsigned16, additive-expr function init() { int:Signed8 startIndex = 1; @@ -694,7 +694,7 @@ function init() { Test-Case: output Description: Test range expression when value of the first expression is a negative Signed8 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Unsigned16, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Unsigned16, unary-minus, additive-expr function init() { int:Signed8 startIndex = -10; @@ -709,7 +709,7 @@ function init() { Test-Case: output Description: Test range expression when value of the first expression is a positive Signed8 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Unsigned32, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Unsigned32, additive-expr function init() { int:Signed8 startIndex = 1; @@ -724,7 +724,7 @@ function init() { Test-Case: output Description: Test range expression when value of the first expression is a negative Signed8 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Unsigned32, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Unsigned32, unary-minus, additive-expr function init() { int:Signed8 startIndex = -10; @@ -739,7 +739,7 @@ function init() { Test-Case: output Description: Test range expression when value of the first expression is a positive Signed16 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, additive-expr function init() { int:Signed16 startIndex = 1; @@ -754,7 +754,7 @@ function init() { Test-Case: output Description: Test range expression when value of the first expression is a negative Signed16 integer and value of the second expression is a negative integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, unary-minus, additive-expr function init() { int:Signed16 startIndex = -10; @@ -769,7 +769,7 @@ function init() { Test-Case: output Description: Test range expression when value of the first expression is a negative Signed16 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, unary-minus, additive-expr function init() { int:Signed16 startIndex = -10; @@ -784,7 +784,7 @@ function init() { Test-Case: output Description: Test range expression when value of the first expression is a positive Signed16 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Signed16, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Signed16, additive-expr function init() { int:Signed16 startIndex = 1; @@ -799,7 +799,7 @@ function init() { Test-Case: output Description: Test range expression when value of the first expression is a negative Signed16 integer and value of the second expression is a negative Signed8 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Signed16, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Signed16, unary-minus, additive-expr function init() { int:Signed16 startIndex = -10; @@ -814,7 +814,7 @@ function init() { Test-Case: output Description: Test range expression when value of the first expression is a negative Signed16 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Signed16, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Signed16, unary-minus, additive-expr function init() { int:Signed16 startIndex = -10; @@ -829,7 +829,7 @@ function init() { Test-Case: output Description: Test range expression when value of the first expression is a positive Signed16 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, int:Signed32, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, int:Signed32, additive-expr function init() { int:Signed16 startIndex = 1; @@ -844,7 +844,7 @@ function init() { Test-Case: output Description: Test range expression when value of the first expression is a negative Signed16 integer and value of the second expression is a negative Signed32 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, int:Signed32, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, int:Signed32, unary-minus, additive-expr function init() { int:Signed16 startIndex = -10; @@ -859,7 +859,7 @@ function init() { Test-Case: output Description: Test range expression when value of the first expression is a negative Signed16 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, int:Signed32, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, int:Signed32, unary-minus, additive-expr function init() { int:Signed16 startIndex = -10; @@ -874,7 +874,7 @@ function init() { Test-Case: output Description: Test range expression when value of the first expression is a positive Signed16 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, int:Unsigned8, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, int:Unsigned8, additive-expr function init() { int:Signed16 startIndex = 1; @@ -889,7 +889,7 @@ function init() { Test-Case: output Description: Test range expression when value of the first expression is a negative Signed16 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, int:Unsigned8, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, int:Unsigned8, unary-minus, additive-expr function init() { int:Signed16 startIndex = -10; @@ -905,7 +905,7 @@ Test-Case: output Description: Test range expression when value of the first expression is a positive Signed16 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, byte, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, byte, additive-expr function init() { int:Signed16 startIndex = 1; @@ -921,7 +921,7 @@ Test-Case: output Description: Test range expression when value of the first expression is a negative Signed16 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, byte, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, byte, unary-minus, additive-expr function init() { int:Signed16 startIndex = -10; @@ -936,7 +936,7 @@ function init() { Test-Case: output Description: Test range expression when value of the first expression is a positive Signed16 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, int:Unsigned16, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, int:Unsigned16, additive-expr function init() { int:Signed16 startIndex = 1; @@ -951,7 +951,7 @@ function init() { Test-Case: output Description: Test range expression when value of the first expression is a negative Signed16 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, int:Unsigned16, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, int:Unsigned16, unary-minus, additive-expr function init() { int:Signed16 startIndex = -10; @@ -966,7 +966,7 @@ function init() { Test-Case: output Description: Test range expression when value of the first expression is a positive Signed16 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, int:Unsigned32, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, int:Unsigned32, additive-expr function init() { int:Signed16 startIndex = 1; @@ -981,7 +981,7 @@ function init() { Test-Case: output Description: Test range expression when value of the first expression is a negative Signed16 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, int:Unsigned32, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, int:Unsigned32, unary-minus, additive-expr function init() { int:Signed16 startIndex = -10; @@ -996,7 +996,7 @@ function init() { Test-Case: output Description: Test range expression when value of the first expression is a positive Signed32 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, additive-expr function init() { int:Signed32 startIndex = 1; @@ -1011,7 +1011,7 @@ function init() { Test-Case: output Description: Test range expression when value of the first expression is a negative Signed32 integer and value of the second expression is a negative integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, unary-minus, additive-expr function init() { int:Signed32 startIndex = -10; @@ -1026,7 +1026,7 @@ function init() { Test-Case: output Description: Test range expression when value of the first expression is a negative Signed32 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, unary-minus, additive-expr function init() { int:Signed32 startIndex = -10; @@ -1041,7 +1041,7 @@ function init() { Test-Case: output Description: Test range expression when value of the first expression is a positive Signed32 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Signed32, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Signed32, additive-expr function init() { int:Signed32 startIndex = 1; @@ -1056,7 +1056,7 @@ function init() { Test-Case: output Description: Test range expression when value of the first expression is a negative Signed32 integer and value of the second expression is a negative Signed8 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Signed32, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Signed32, unary-minus, additive-expr function init() { int:Signed32 startIndex = -10; @@ -1071,7 +1071,7 @@ function init() { Test-Case: output Description: Test range expression when value of the first expression is a negative Signed32 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Signed32, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Signed32, unary-minus, additive-expr function init() { int:Signed32 startIndex = -10; @@ -1086,7 +1086,7 @@ function init() { Test-Case: output Description: Test range expression when value of the first expression is a positive Signed32 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, int:Signed32, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, int:Signed32, additive-expr function init() { int:Signed32 startIndex = 1; @@ -1101,7 +1101,7 @@ function init() { Test-Case: output Description: Test range expression when value of the first expression is a negative Signed32 integer and value of the second expression is a negative Signed16 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, int:Signed32, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, int:Signed32, unary-minus, additive-expr function init() { int:Signed32 startIndex = -10; @@ -1116,7 +1116,7 @@ function init() { Test-Case: output Description: Test range expression when value of the first expression is a negative Signed32 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, int:Signed32, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, int:Signed32, unary-minus, additive-expr function init() { int:Signed32 startIndex = -10; @@ -1131,7 +1131,7 @@ function init() { Test-Case: output Description: Test range expression when value of the first expression is a positive Signed32 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, int:Unsigned8, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, int:Unsigned8, additive-expr function init() { int:Signed32 startIndex = 1; @@ -1146,7 +1146,7 @@ function init() { Test-Case: output Description: Test range expression when value of the first expression is a negative Signed32 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, int:Unsigned8, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, int:Unsigned8, unary-minus, additive-expr function init() { int:Signed32 startIndex = -10; @@ -1162,7 +1162,7 @@ Test-Case: output Description: Test range expression when value of the first expression is a positive Signed32 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, byte, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, byte, additive-expr function init() { int:Signed32 startIndex = 1; @@ -1178,7 +1178,7 @@ Test-Case: output Description: Test range expression when value of the first expression is a negative Signed32 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, byte, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, byte, unary-minus, additive-expr function init() { int:Signed32 startIndex = -10; @@ -1193,7 +1193,7 @@ function init() { Test-Case: output Description: Test range expression when value of the first expression is a positive Signed32 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, int:Unsigned16, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, int:Unsigned16, additive-expr function init() { int:Signed32 startIndex = 1; @@ -1208,7 +1208,7 @@ function init() { Test-Case: output Description: Test range expression when value of the first expression is a negative Signed32 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, int:Unsigned16, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, int:Unsigned16, unary-minus, additive-expr function init() { int:Signed32 startIndex = -10; @@ -1223,7 +1223,7 @@ function init() { Test-Case: output Description: Test range expression when value of the first expression is a positive Signed32 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, int:Unsigned32, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, int:Unsigned32, additive-expr function init() { int:Signed32 startIndex = 1; @@ -1238,7 +1238,7 @@ function init() { Test-Case: output Description: Test range expression when value of the first expression is a negative Signed32 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, int:Unsigned32, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, int:Unsigned32, unary-minus, additive-expr function init() { int:Signed32 startIndex = -10; @@ -1253,7 +1253,7 @@ function init() { Test-Case: output Description: Test range expression when value of the first expression is a Unsigned8 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned8, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned8, additive-expr function init() { int:Unsigned8 startIndex = 1; @@ -1268,7 +1268,7 @@ function init() { Test-Case: output Description: Test range expression when value of the first expression is a Unsigned8 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Unsigned8, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Unsigned8, additive-expr function init() { int:Unsigned8 startIndex = 1; @@ -1283,7 +1283,7 @@ function init() { Test-Case: output Description: Test range expression when value of the first expression is a Unsigned8 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, int:Unsigned8, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, int:Unsigned8, additive-expr function init() { int:Unsigned8 startIndex = 1; @@ -1298,7 +1298,7 @@ function init() { Test-Case: output Description: Test range expression when value of the first expression is a Unsigned8 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, int:Unsigned8, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, int:Unsigned8, additive-expr function init() { int:Unsigned8 startIndex = 1; @@ -1314,7 +1314,7 @@ Test-Case: output Description: Test range expression when value of the first expression is a Unsigned8 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned8, byte, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned8, byte, additive-expr function init() { int:Unsigned8 startIndex = 1; @@ -1329,7 +1329,7 @@ function init() { Test-Case: output Description: Test range expression when value of the first expression is a Unsigned8 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned8, int:Unsigned16, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned8, int:Unsigned16, additive-expr function init() { int:Unsigned8 startIndex = 1; @@ -1344,7 +1344,7 @@ function init() { Test-Case: output Description: Test range expression when value of the first expression is a Unsigned8 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned8, int:Unsigned32, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned8, int:Unsigned32, additive-expr function init() { int:Unsigned8 startIndex = 1; @@ -1359,7 +1359,7 @@ function init() { Test-Case: output Description: Test range expression when value of the first expression is a Unsigned16 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned16, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned16, additive-expr function init() { int:Unsigned16 startIndex = 1; @@ -1374,7 +1374,7 @@ function init() { Test-Case: output Description: Test range expression when value of the first expression is a Unsigned16 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Unsigned16, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Unsigned16, additive-expr function init() { int:Unsigned16 startIndex = 1; @@ -1389,7 +1389,7 @@ function init() { Test-Case: output Description: Test range expression when value of the first expression is a Unsigned16 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, int:Unsigned16, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, int:Unsigned16, additive-expr function init() { int:Unsigned16 startIndex = 1; @@ -1404,7 +1404,7 @@ function init() { Test-Case: output Description: Test range expression when value of the first expression is a Unsigned16 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, int:Unsigned16, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, int:Unsigned16, additive-expr function init() { int:Unsigned16 startIndex = 1; @@ -1419,7 +1419,7 @@ function init() { Test-Case: output Description: Test range expression when value of the first expression is a Unsigned16 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned8, int:Unsigned16, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned8, int:Unsigned16, additive-expr function init() { int:Unsigned16 startIndex = 1; @@ -1435,7 +1435,7 @@ Test-Case: output Description: Test range expression when value of the first expression is a Unsigned16 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned16, byte, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned16, byte, additive-expr function init() { int:Unsigned16 startIndex = 1; @@ -1450,7 +1450,7 @@ function init() { Test-Case: output Description: Test range expression when value of the first expression is a Unsigned16 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned16, int:Unsigned32, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned16, int:Unsigned32, additive-expr function init() { int:Unsigned16 startIndex = 1; @@ -1465,7 +1465,7 @@ function init() { Test-Case: output Description: Test range expression when value of the first expression is a Unsigned32 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned32, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned32, additive-expr function init() { int:Unsigned32 startIndex = 1; @@ -1480,7 +1480,7 @@ function init() { Test-Case: output Description: Test range expression when value of the first expression is a Unsigned32 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Unsigned32, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Unsigned32, additive-expr function init() { int:Unsigned32 startIndex = 1; @@ -1495,7 +1495,7 @@ function init() { Test-Case: output Description: Test range expression when value of the first expression is a Unsigned32 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, int:Unsigned32, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, int:Unsigned32, additive-expr function init() { int:Unsigned32 startIndex = 1; @@ -1510,7 +1510,7 @@ function init() { Test-Case: output Description: Test range expression when value of the first expression is a Unsigned32 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, int:Unsigned32, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, int:Unsigned32, additive-expr function init() { int:Unsigned32 startIndex = 1; @@ -1525,7 +1525,7 @@ function init() { Test-Case: output Description: Test range expression when value of the first expression is a Unsigned32 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned8, int:Unsigned32, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned8, int:Unsigned32, additive-expr function init() { int:Unsigned32 startIndex = 1; @@ -1541,7 +1541,7 @@ Test-Case: output Description: Test range expression when value of the first expression is a Unsigned32 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned32, byte, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned32, byte, additive-expr function init() { int:Unsigned32 startIndex = 1; @@ -1556,7 +1556,7 @@ function init() { Test-Case: output Description: Test range expression when value of the first expression is a Unsigned32 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned16, int:Unsigned32, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned16, int:Unsigned32, additive-expr function init() { int:Unsigned32 startIndex = 1; @@ -1571,7 +1571,7 @@ function init() { Test-Case: output Description: Test range expression when values of expressions are of user-defined subtypes of int. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-exclusive, int, DecimalNumber, singleton-type, union-type, module-type-decl, +Labels: range-expr, iterable-exclusive, int, DecimalNumber, singleton-type, union-type, module-type-decl, additive-expr type Ints 1|10; @@ -1589,7 +1589,7 @@ function init() { Test-Case: output Description: Test range expression when values of expressions are of union of int subtypes. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Unsigned32, union-type, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Unsigned32, union-type, additive-expr function init() { int:Signed8|int:Unsigned32 startIndex = 1; @@ -1604,7 +1604,7 @@ function init() { Test-Case: output Description: Test range expression when the value of the first expression and the value of the second expression is equal. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, additive-expr function init() { int startIndex = 5; @@ -1620,7 +1620,7 @@ function init() { Test-Case: output Description: Test range expression when the value of the first expression is less than the value of the second expression. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, additive-expr +Labels: range-expr, iterable-exclusive, int, DecimalNumber, additive-expr function init() { int startIndex = 5; @@ -1635,7 +1635,7 @@ function init() { Test-Case: output Description: Test range expression when the types expressions are inferred. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, additive-expr, var +Labels: range-expr, iterable-exclusive, int, DecimalNumber, additive-expr, var function init() { var startIndex = 1; @@ -1650,7 +1650,7 @@ function init() { Test-Case: output Description: Test field and member access as expressions in range expression. -Labels: range-expr, iterable-exclusive, array-type, DecimalNumber, field-access-expr, int, list-constructor, +Labels: range-expr, iterable-exclusive, array-type, DecimalNumber, field-access-expr, int, list-constructor, mapping-constructor, member-access-expr, module-type-defn, record-type type Record record { @@ -1670,7 +1670,7 @@ function init() { Test-Case: output Description: Test function and method call as expressions in range expression. -Labels: range-expr, iterable-exclusive, DecimalNumber, int, explicit-new-expr, function-call-expr +Labels: range-expr, iterable-exclusive, DecimalNumber, int, explicit-new-expr, function-call-expr module-class-defn, method-call-expr class Class { @@ -1695,7 +1695,7 @@ function getInt() returns int { Test-Case: output Description: Test type cast expression as expressions in range expression. -Labels: range-expr, iterable-exclusive, DecimalNumber, int, type-cast-expr +Labels: range-expr, iterable-exclusive, DecimalNumber, int, type-cast-expr function init() { int count = 0; @@ -1708,7 +1708,7 @@ function init() { Test-Case: output Description: Test unary expressions as expressions in range expression. -Labels: range-expr, iterable-exclusive, DecimalNumber, int, unary-complement, unary-minus, unary-plus +Labels: range-expr, iterable-exclusive, DecimalNumber, int, unary-complement, unary-minus, unary-plus function init() { int count = 0; @@ -1727,7 +1727,7 @@ function init() { Test-Case: output Description: Test additive expression as expressions in range expression. -Labels: range-expr, iterable-exclusive, additive-expr, int, DecimalNumber +Labels: range-expr, iterable-exclusive, additive-expr, int, DecimalNumber function init() { int count = 0; @@ -1740,7 +1740,7 @@ function init() { Test-Case: output Description: Test multiplicative expressions as expressions in range expression. -Labels: range-expr, iterable-exclusive, DecimalNumber, int, multiplicative-expr +Labels: range-expr, iterable-exclusive, DecimalNumber, int, multiplicative-expr function init() { int count = 0; @@ -1759,7 +1759,7 @@ function init() { Test-Case: output Description: Test binary bitwise expressions as expressions in range expression. -Labels: range-expr, iterable-exclusive, binary-bitwise-expr, DecimalNumber, int +Labels: range-expr, iterable-exclusive, binary-bitwise-expr, DecimalNumber, int function init() { int count = 0; @@ -1778,7 +1778,7 @@ function init() { Test-Case: output Description: Test checking expressions as expressions in range expression. -Labels: range-expr, iterable-exclusive, check, checkpanic DecimalNumber, error, int, union-type +Labels: range-expr, iterable-exclusive, check, checkpanic, DecimalNumber, error, int, union-type, optional-type function init() returns error? { int|error startIndex = 2; @@ -1793,7 +1793,7 @@ function init() returns error? { Test-Case: output Description: Test let expression as expressions in range expression. -Labels: range-expr, iterable-exclusive, DecimalNumber, int, let-expr +Labels: range-expr, iterable-exclusive, let-expr, DecimalNumber, int function init() { int count = 0; @@ -1806,7 +1806,7 @@ function init() { Test-Case: output Description: Test shift expressions as expressions in range expression. -Labels: range-expr, iterable-exclusive, DecimalNumber, int, shift-expr +Labels: range-expr, iterable-exclusive, shift-expr, DecimalNumber, int function init() { int count = 0; @@ -1819,7 +1819,7 @@ function init() { Test-Case: output Description: Test conditional expressions as expressions in range expression. -Labels: range-expr, iterable-exclusive, conditional-expr, DecimalNumber, error, int, nil-literal, +Labels: range-expr, iterable-exclusive, conditional-expr, DecimalNumber, error, int, nil-literal, optional-type, union-type function init() { @@ -1835,7 +1835,7 @@ function init() { Test-Case: output Description: Test lang.int constants as expressions in range expression. -Labels: range-expr, iterable-exclusive, int, int:SIGNED8_MAX_VALUE, int:UNSIGNED8_MAX_VALUE +Labels: range-expr, iterable-exclusive, int, int:SIGNED8_MAX_VALUE, int:UNSIGNED8_MAX_VALUE function init() { int count = 0; @@ -1848,7 +1848,7 @@ function init() { Test-Case: output Description: Test range expression with iterable object when values of expressions are positive integers -Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, record-type, optional-type +Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, object-type, record-type, optional-type function init() { int startIndex = 0; @@ -1857,7 +1857,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -1870,7 +1870,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when values of expressions are negative integers -Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, record-type, optional-type, unary-minus +Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, object-type, record-type, optional-type, + unary-minus function init() { int startIndex = -6; @@ -1879,7 +1880,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -1892,7 +1893,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when values of expressions are integers -Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, record-type, optional-type, unary-minus +Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, object-type, record-type, optional-type, + unary-minus function init() { int startIndex = -10; @@ -1901,7 +1903,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -1914,7 +1916,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when values of both expressions are integers -Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, record-type, optional-type, unary-minus +Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, object-type, record-type, optional-type, + unary-minus function init() { int startIndex = -7635315; @@ -1923,7 +1926,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -1937,7 +1940,7 @@ function init() { Test-Case: output Description: Test range expression with iterable object when values of expressions are positive Signed8 integers Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, int:Signed8, additive-expr, - record-type, optional-type + object-type, record-type, optional-type function init() { int:Signed8 startIndex = 1; @@ -1945,7 +1948,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -1959,7 +1962,7 @@ function init() { Test-Case: output Description: Test range expression with iterable object when values of expressions are negative Signed8 integers -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, additive-expr, +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -1969,7 +1972,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -1982,7 +1985,7 @@ function init() { Test-Case: output Description: Test range expression with iterable object when values of expressions are Signed8 integers -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, additive-expr, +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -1992,7 +1995,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -2005,7 +2008,7 @@ function init() { Test-Case: output Description: Test range expression with iterable object when values of expressions are positive Signed16 integers -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, object-type, record-type, optional-type function init() { @@ -2015,7 +2018,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -2028,7 +2031,7 @@ function init() { Test-Case: output Description: Test range expression with iterable object when values of expressions are negative Signed16 integers -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, record-type, +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -2038,7 +2041,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -2051,7 +2054,7 @@ function init() { Test-Case: output Description: Test range expression with iterable object when values of expressions are Signed16 integers -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, record-type, +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -2061,7 +2064,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -2074,7 +2077,7 @@ function init() { Test-Case: output Description: Test range expression with iterable object when values of expressions are positive Signed32 integers -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, record-type, +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, object-type, record-type, optional-type function init() { @@ -2084,7 +2087,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -2097,7 +2100,7 @@ function init() { Test-Case: output Description: Test range expression with iterable object when values of expressions are negative Signed32 integers -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, record-type, +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -2107,7 +2110,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -2120,7 +2123,7 @@ function init() { Test-Case: output Description: Test range expression with iterable object when values of expressions are Signed32 integers -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, record-type, +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -2130,7 +2133,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -2143,7 +2146,7 @@ function init() { Test-Case: output Description: Test range expression with iterable object when values of expressions are Unsigned8 integers -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, additive-expr, record-type, +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, additive-expr, object-type, record-type, optional-type function init() { @@ -2153,7 +2156,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -2166,7 +2169,7 @@ function init() { Test-Case: output Description: Test range expression with iterable object when values of expressions are Unsigned16 integers -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, additive-expr, record-type, +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -2176,7 +2179,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -2189,7 +2192,7 @@ function init() { Test-Case: output Description: Test range expression with iterable object when values of expressions are Unsigned32 integers -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, additive-expr, record-type, +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -2199,7 +2202,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -2213,7 +2216,7 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a positive integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, additive-expr, record-type, +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, additive-expr, object-type, record-type, optional-type function init() { @@ -2223,7 +2226,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -2235,9 +2238,9 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a negative integer and value of the - second expression is a negative Signed8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, additive-expr, record-type, +Description: Test range expression with iterable object when value of the first expression is a negative integer + and value of the second expression is a negative Signed8 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -2247,7 +2250,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -2259,9 +2262,9 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a negative integer and value of the - second expression is a positive Signed8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, additive-expr, record-type, +Description: Test range expression with iterable object when value of the first expression is a negative integer + and value of the second expression is a positive Signed8 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -2271,7 +2274,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -2285,7 +2288,7 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a positive integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, record-type, +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, object-type, record-type, optional-type function init() { @@ -2295,7 +2298,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -2309,7 +2312,7 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a negative integer and value of the second expression is a negative Signed16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, record-type, +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -2319,7 +2322,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -2333,7 +2336,7 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a negative integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, record-type, +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -2343,7 +2346,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -2355,9 +2358,9 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a positive integer and value of the - second expression is a positive Signed32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, record-type, +Description: Test range expression with iterable object when value of the first expression is a positive integer + and value of the second expression is a positive Signed32 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, object-type, record-type, optional-type function init() { @@ -2367,7 +2370,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -2381,7 +2384,7 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a negative integer and value of the second expression is a negative Signed32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, record-type, +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -2391,7 +2394,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -2405,7 +2408,7 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a negative integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, record-type, +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -2415,7 +2418,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -2429,7 +2432,7 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a positive integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, additive-expr, record-type, +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, additive-expr, object-type, record-type, optional-type function init() { @@ -2439,7 +2442,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -2453,7 +2456,7 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a negative integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, additive-expr, record-type, +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -2463,7 +2466,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -2478,7 +2481,7 @@ Test-Case: output Description: Test range expression with iterable object when value of the first expression is a positive integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, int, DecimalNumber, byte, additive-expr, record-type, optional-type +Labels: range-expr, iterable-object, int, DecimalNumber, byte, additive-expr, object-type, record-type, optional-type function init() { int startIndex = 1; @@ -2487,7 +2490,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -2502,7 +2505,8 @@ Test-Case: output Description: Test range expression with iterable object when value of the first expression is a negative integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, int, DecimalNumber, byte, additive-expr, record-type, optional-type, unary-minus +Labels: range-expr, iterable-object, int, DecimalNumber, byte, additive-expr, object-type, record-type, optional-type, + unary-minus function init() { int startIndex = -10; @@ -2511,7 +2515,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -2525,7 +2529,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a positive integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, additive-expr, record-type, optional-type +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, additive-expr, object-type, record-type, + optional-type function init() { int startIndex = 1; @@ -2534,7 +2539,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -2548,8 +2553,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a negative integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, additive-expr, record-type, optional-type, - unary-minus +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, additive-expr, object-type, record-type, + optional-type, unary-minus function init() { int startIndex = -10; @@ -2558,7 +2563,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -2572,7 +2577,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a positive integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, additive-expr, record-type, optional-type +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, additive-expr, object-type, record-type, + optional-type function init() { int startIndex = 1; @@ -2581,7 +2587,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -2595,8 +2601,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a negative integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, additive-expr, record-type, optional-type, - unary-minus +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, additive-expr, object-type, record-type, + optional-type, unary-minus function init() { int startIndex = -10; @@ -2605,7 +2611,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -2619,7 +2625,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a positive Signed8 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, additive-expr, record-type, optional-type +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, additive-expr, object-type, record-type, + optional-type function init() { int:Signed8 startIndex = 1; @@ -2628,7 +2635,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -2642,8 +2649,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a negative integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, additive-expr, record-type, optional-type, - unary-minus +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, additive-expr, object-type, record-type, + optional-type, unary-minus function init() { int:Signed8 startIndex = -10; @@ -2652,7 +2659,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -2666,8 +2673,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, additive-expr, record-type, optional-type, - unary-minus +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, additive-expr, object-type, record-type, + optional-type, unary-minus function init() { int:Signed8 startIndex = -10; @@ -2676,7 +2683,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -2690,8 +2697,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a positive Signed8 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Signed16, additive-expr, record-type, - optional-type +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Signed16, additive-expr, object-type, + record-type, optional-type function init() { int:Signed8 startIndex = 1; @@ -2700,7 +2707,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -2714,8 +2721,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a negative Signed16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Signed16, additive-expr, record-type, - optional-type, unary-minus +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Signed16, additive-expr, object-type, + record-type, optional-type, unary-minus function init() { int:Signed8 startIndex = -10; @@ -2724,7 +2731,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -2738,8 +2745,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Signed16, additive-expr, record-type, - optional-type, unary-minus +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Signed16, additive-expr, object-type, + record-type, optional-type, unary-minus function init() { int:Signed8 startIndex = -10; @@ -2748,7 +2755,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -2762,8 +2769,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a positive Signed8 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Signed32, additive-expr, record-type, - optional-type +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Signed32, additive-expr, object-type, + record-type, optional-type function init() { int:Signed8 startIndex = 1; @@ -2772,7 +2779,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -2787,8 +2794,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a negative Signed32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Signed32, additive-expr, record-type, - optional-type, unary-minus +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Signed32, additive-expr, object-type, + record-type, optional-type, unary-minus function init() { int:Signed8 startIndex = -10; @@ -2797,7 +2804,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -2811,8 +2818,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Signed32, additive-expr, record-type, - optional-type, unary-minus +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Signed32, additive-expr, object-type, + record-type, optional-type, unary-minus function init() { int:Signed8 startIndex = -10; @@ -2821,7 +2828,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -2835,8 +2842,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a positive Signed8 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Unsigned8, additive-expr, record-type, - optional-type +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Unsigned8, additive-expr, object-type, + record-type, optional-type function init() { int:Signed8 startIndex = 1; @@ -2845,7 +2852,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -2860,8 +2867,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Unsigned8, additive-expr, record-type, - optional-type, unary-minus +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Unsigned8, additive-expr, object-type, + record-type, optional-type, unary-minus function init() { int:Signed8 startIndex = -10; @@ -2870,7 +2877,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -2882,10 +2889,10 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a positive Signed8 integer and value of the - second expression is a byte. +Description: Test range expression with iterable object when value of the first expression is a positive Signed8 integer + and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, byte, additive-expr, record-type, +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, byte, additive-expr, object-type, record-type, optional-type function init() { @@ -2895,7 +2902,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -2910,7 +2917,7 @@ Test-Case: output Description: Test range expression with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, byte, additive-expr, record-type, +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, byte, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -2920,7 +2927,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -2934,8 +2941,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a positive Signed8 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Unsigned16, additive-expr, record-type, - optional-type +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Unsigned16, additive-expr, object-type, + record-type, optional-type function init() { int:Signed8 startIndex = 1; @@ -2944,7 +2951,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -2958,8 +2965,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Unsigned16, additive-expr, record-type, - optional-type, unary-minus +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Unsigned16, additive-expr, object-type, + record-type, optional-type, unary-minus function init() { int:Signed8 startIndex = -10; @@ -2968,7 +2975,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -2980,10 +2987,10 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a positive Signed8 integer and value of the - second expression is a Unsigned32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Unsigned32, additive-expr, record-type, - optional-type +Description: Test range expression with iterable object when value of the first expression is a positive Signed8 integer + and value of the second expression is a Unsigned32 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Unsigned32, additive-expr, object-type, + record-type, optional-type function init() { int:Signed8 startIndex = 1; @@ -2992,7 +2999,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -3006,8 +3013,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Unsigned32, additive-expr, record-type, - optional-type, unary-minus +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Unsigned32, additive-expr, object-type, + record-type, optional-type, unary-minus function init() { int:Signed8 startIndex = -10; @@ -3016,7 +3023,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -3030,7 +3037,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a positive Signed16 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, record-type, optional-type +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, object-type, record-type, + optional-type function init() { int:Signed16 startIndex = 1; @@ -3039,7 +3047,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -3053,8 +3061,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a negative integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, record-type, optional-type, - unary-minus +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, object-type, record-type, + optional-type, unary-minus function init() { int:Signed16 startIndex = -10; @@ -3063,7 +3071,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -3077,8 +3085,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, record-type, optional-type, - unary-minus +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, object-type, record-type, + optional-type, unary-minus function init() { int:Signed16 startIndex = -10; @@ -3087,7 +3095,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -3101,8 +3109,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a positive Signed16 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Signed8, additive-expr, record-type, - optional-type +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Signed8, additive-expr, object-type, + record-type, optional-type function init() { int:Signed16 startIndex = 1; @@ -3111,7 +3119,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -3125,8 +3133,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a negative Signed8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Signed8, additive-expr, record-type, - optional-type, unary-minus +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Signed8, additive-expr, object-type, + record-type, optional-type, unary-minus function init() { int:Signed16 startIndex = -10; @@ -3135,7 +3143,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -3149,8 +3157,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Signed8, additive-expr, record-type, - optional-type, unary-minus +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Signed8, additive-expr, object-type, + record-type, optional-type, unary-minus function init() { int:Signed16 startIndex = -10; @@ -3159,7 +3167,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -3173,8 +3181,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a positive Signed16 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Signed32, additive-expr, record-type, - optional-type +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Signed32, additive-expr, object-type, + record-type, optional-type function init() { int:Signed16 startIndex = 1; @@ -3183,7 +3191,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -3197,8 +3205,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a negative Signed32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Signed32, additive-expr, record-type, - optional-type, unary-minus +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Signed32, additive-expr, object-type, + record-type, optional-type, unary-minus function init() { int:Signed16 startIndex = -10; @@ -3207,7 +3215,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -3221,8 +3229,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Signed32, additive-expr, record-type, - optional-type, unary-minus +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Signed32, additive-expr, object-type, + record-type, optional-type, unary-minus function init() { int:Signed16 startIndex = -10; @@ -3231,7 +3239,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -3245,8 +3253,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a positive Signed16 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Unsigned8, additive-expr, record-type, - optional-type +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Unsigned8, additive-expr, object-type, + record-type, optional-type function init() { int:Signed16 startIndex = 1; @@ -3255,7 +3263,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -3269,8 +3277,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Unsigned8, additive-expr, record-type, - optional-type, unary-minus +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Unsigned8, additive-expr, object-type, + record-type, optional-type, unary-minus function init() { int:Signed16 startIndex = -10; @@ -3279,7 +3287,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -3294,7 +3302,7 @@ Test-Case: output Description: Test range expression with iterable object when value of the first expression is a positive Signed16 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, byte, additive-expr, record-type, +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, byte, additive-expr, object-type, record-type, optional-type function init() { @@ -3304,7 +3312,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -3319,7 +3327,7 @@ Test-Case: output Description: Test range expression with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, byte, additive-expr, record-type, +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, byte, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -3329,7 +3337,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -3343,8 +3351,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a positive Signed16 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Unsigned16, additive-expr, record-type, - optional-type +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Unsigned16, additive-expr, object-type, + record-type, optional-type function init() { int:Signed16 startIndex = 1; @@ -3353,7 +3361,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -3367,8 +3375,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Unsigned16, additive-expr, record-type, - optional-type, unary-minus +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Unsigned16, additive-expr, object-type, + record-type, optional-type, unary-minus function init() { int:Signed16 startIndex = -10; @@ -3377,7 +3385,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -3391,8 +3399,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a positive Signed16 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Unsigned32, additive-expr, record-type, - optional-type +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Unsigned32, additive-expr, object-type, + record-type, optional-type function init() { int:Signed16 startIndex = 1; @@ -3401,7 +3409,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -3415,8 +3423,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Unsigned32, additive-expr, record-type, - optional-type, unary-minus +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Unsigned32, additive-expr, object-type, + record-type, optional-type, unary-minus function init() { int:Signed16 startIndex = -10; @@ -3425,7 +3433,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -3439,7 +3447,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a positive Signed32 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, record-type, optional-type +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, object-type, record-type, + optional-type function init() { int:Signed32 startIndex = 1; @@ -3448,7 +3457,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -3462,8 +3471,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a negative integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, record-type, optional-type, - unary-minus +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, object-type, record-type, + optional-type, unary-minus function init() { int:Signed32 startIndex = -10; @@ -3472,7 +3481,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -3486,8 +3495,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, record-type, optional-type, - unary-minus +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, object-type, record-type, + optional-type, unary-minus function init() { int:Signed32 startIndex = -10; @@ -3496,7 +3505,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -3510,8 +3519,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a positive Signed32 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Signed8, additive-expr, record-type, - optional-type +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Signed8, additive-expr, object-type, + record-type, optional-type function init() { int:Signed32 startIndex = 1; @@ -3520,7 +3529,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -3534,8 +3543,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a negative Signed8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Signed8, additive-expr, record-type, - optional-type, unary-minus +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Signed8, additive-expr, object-type, + record-type, optional-type, unary-minus function init() { int:Signed32 startIndex = -10; @@ -3544,7 +3553,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -3558,8 +3567,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Signed8, additive-expr, record-type, - optional-type, unary-minus +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Signed8, additive-expr, object-type, + record-type, optional-type, unary-minus function init() { int:Signed32 startIndex = -10; @@ -3568,7 +3577,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -3582,8 +3591,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a positive Signed32 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Signed16, additive-expr, record-type, - optional-type +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Signed16, additive-expr, object-type, + record-type, optional-type function init() { int:Signed32 startIndex = 1; @@ -3592,7 +3601,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -3606,8 +3615,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a negative Signed16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Signed16, additive-expr, record-type, - optional-type, unary-minus +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Signed16, additive-expr, object-type, + record-type, optional-type, unary-minus function init() { int:Signed32 startIndex = -10; @@ -3616,7 +3625,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -3630,8 +3639,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Signed16, additive-expr, record-type, - optional-type, unary-minus +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Signed16, additive-expr, object-type, + record-type, optional-type, unary-minus function init() { int:Signed32 startIndex = -10; @@ -3640,7 +3649,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -3654,8 +3663,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a positive Signed32 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Unsigned8, additive-expr, record-type, - optional-type +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Unsigned8, additive-expr, object-type, + record-type, optional-type function init() { int:Signed32 startIndex = 1; @@ -3664,7 +3673,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -3678,8 +3687,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Unsigned8, additive-expr, record-type, - optional-type, unary-minus +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Unsigned8, additive-expr, object-type, + record-type, optional-type, unary-minus function init() { int:Signed32 startIndex = -10; @@ -3688,7 +3697,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -3703,7 +3712,7 @@ Test-Case: output Description: Test range expression with iterable object when value of the first expression is a positive Signed32 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, bye, additive-expr, record-type, +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, bye, additive-expr, object-type, record-type, optional-type function init() { @@ -3713,7 +3722,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -3728,7 +3737,7 @@ Test-Case: output Description: Test range expression with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, byte, additive-expr, record-type, +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, byte, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -3738,7 +3747,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -3752,8 +3761,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a positive Signed32 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Unsigned16, additive-expr, record-type, - optional-type +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Unsigned16, additive-expr, object-type, + record-type, optional-type function init() { int:Signed32 startIndex = 1; @@ -3762,7 +3771,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -3776,8 +3785,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Unsigned16, additive-expr, record-type, - optional-type, unary-minus +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Unsigned16, additive-expr, object-type, + record-type, optional-type, unary-minus function init() { int:Signed32 startIndex = -10; @@ -3786,7 +3795,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -3800,8 +3809,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a positive Signed32 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Unsigned32, additive-expr, record-type, - optional-type +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Unsigned32, additive-expr, object-type, + record-type, optional-type function init() { int:Signed32 startIndex = 1; @@ -3810,7 +3819,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -3824,8 +3833,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Unsigned32, additive-expr, record-type, - optional-type, unary-minus +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Unsigned32, additive-expr, object-type, + record-type, optional-type, unary-minus function init() { int:Signed32 startIndex = -10; @@ -3834,7 +3843,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -3848,7 +3857,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a Unsigned8 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, additive-expr, record-type, optional-type +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, additive-expr, object-type, record-type, + optional-type function init() { int:Unsigned8 startIndex = 1; @@ -3857,7 +3867,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -3871,8 +3881,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a Unsigned8 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, int:Signed8, additive-expr, record-type, - optional-type +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, int:Signed8, additive-expr, object-type, + record-type, optional-type function init() { int:Unsigned8 startIndex = 1; @@ -3881,7 +3891,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -3896,8 +3906,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a Unsigned8 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, int:Signed16, additive-expr, record-type, - optional-type +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, int:Signed16, additive-expr, object-type, + record-type, optional-type function init() { int:Unsigned8 startIndex = 1; @@ -3906,7 +3916,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -3920,8 +3930,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a Unsigned8 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, int:Signed32, additive-expr, record-type, - optional-type +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, int:Signed32, additive-expr, object-type, + record-type, optional-type function init() { int:Unsigned8 startIndex = 1; @@ -3930,7 +3940,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -3945,7 +3955,7 @@ Test-Case: output Description: Test range expression with iterable object when value of the first expression is a Unsigned8 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, byte, additive-expr, record-type, +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, byte, additive-expr, object-type, record-type, optional-type function init() { @@ -3955,7 +3965,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -3969,8 +3979,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a Unsigned8 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, int:Unsigned16, additive-expr, record-type, - optional-type +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, int:Unsigned16, additive-expr, object-type, + record-type, optional-type function init() { int:Unsigned8 startIndex = 1; @@ -3979,7 +3989,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -3993,8 +4003,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a Unsigned8 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, int:Unsigned32, additive-expr, record-type, - optional-type +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, int:Unsigned32, additive-expr, object-type, + record-type, optional-type function init() { int:Unsigned8 startIndex = 1; @@ -4003,7 +4013,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -4018,7 +4028,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a Unsigned16 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, additive-expr, record-type, optional-type +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, additive-expr, object-type, record-type, + optional-type function init() { int:Unsigned16 startIndex = 1; @@ -4027,7 +4038,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -4041,8 +4052,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a Unsigned16 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, int:Signed8, additive-expr, record-type, - optional-type +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, int:Signed8, additive-expr, object-type, + record-type, optional-type function init() { int:Unsigned16 startIndex = 1; @@ -4051,7 +4062,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -4065,8 +4076,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a Unsigned16 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, int:Signed16, additive-expr, record-type, - optional-type +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, int:Signed16, additive-expr, object-type, + record-type, optional-type function init() { int:Unsigned16 startIndex = 1; @@ -4075,7 +4086,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -4089,8 +4100,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a Unsigned16 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, int:Signed32, additive-expr, record-type, - optional-type +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, int:Signed32, additive-expr, object-type, + record-type, optional-type function init() { int:Unsigned16 startIndex = 1; @@ -4099,7 +4110,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -4113,8 +4124,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a Unsigned16 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, int:Unsigned8, additive-expr, record-type, - optional-type +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, int:Unsigned8, additive-expr, object-type, + record-type, optional-type function init() { int:Unsigned16 startIndex = 1; @@ -4123,7 +4134,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -4139,7 +4150,7 @@ Test-Case: output Description: Test range expression with iterable object when value of the first expression is a Unsigned16 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, byte, additive-expr, record-type, +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, byte, additive-expr, object-type, record-type, optional-type function init() { @@ -4149,7 +4160,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -4163,8 +4174,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a Unsigned16 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, int:Unsigned32, additive-expr, record-type, - optional-type +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, int:Unsigned32, additive-expr, object-type, + record-type, optional-type function init() { int:Unsigned16 startIndex = 1; @@ -4173,7 +4184,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -4187,7 +4198,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a Unsigned32 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, additive-expr, record-type, optional-type +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, additive-expr, object-type, record-type, + optional-type function init() { int:Unsigned32 startIndex = 1; @@ -4196,7 +4208,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -4210,8 +4222,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a Unsigned32 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, int:Signed8, additive-expr, record-type, - optional-type +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, int:Signed8, additive-expr, object-type, + record-type, optional-type function init() { int:Unsigned32 startIndex = 1; @@ -4220,7 +4232,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -4234,8 +4246,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a Unsigned32 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, int:Signed16, additive-expr, record-type, - optional-type +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, int:Signed16, additive-expr, object-type, + record-type, optional-type function init() { int:Unsigned32 startIndex = 1; @@ -4244,7 +4256,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -4258,8 +4270,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a Unsigned32 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, int:Signed32, additive-expr, record-type, - optional-type +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, int:Signed32, additive-expr, object-type, + record-type, optional-type function init() { int:Unsigned32 startIndex = 1; @@ -4268,7 +4280,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -4282,8 +4294,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a Unsigned32 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, int:Unsigned8, additive-expr, record-type, - optional-type +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, int:Unsigned8, additive-expr, object-type, + record-type, optional-type function init() { int:Unsigned32 startIndex = 1; @@ -4292,7 +4304,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -4307,7 +4319,7 @@ Test-Case: output Description: Test range expression with iterable object when value of the first expression is a Unsigned32 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, byte, additive-expr, record-type, +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, byte, additive-expr, object-type, record-type, optional-type function init() { @@ -4317,7 +4329,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -4331,8 +4343,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a Unsigned32 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, int:Unsigned16, additive-expr, record-type, - optional-type +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, int:Unsigned16, additive-expr, object-type, + record-type, optional-type function init() { int:Unsigned32 startIndex = 1; @@ -4341,7 +4353,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -4356,7 +4368,7 @@ Test-Case: output Description: Test range expression with iterable object when values of expressions are of user-defined subtypes of int. Fail-Issue: ballerina-platform/ballerina-lang#33139 Labels: range-expr, iterable-object, int, DecimalNumber, singleton-type, union-type, module-type-decl, - additive-expr, record-type, optional-type + additive-expr, object-type, record-type, optional-type type Ints 1|10; @@ -4367,7 +4379,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -4382,7 +4394,7 @@ Test-Case: output Description: Test range expression with iterable object when values of expressions are of union of int subtypes. Fail-Issue: ballerina-platform/ballerina-lang#33139 Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Unsigned32, union-type, additive-expr, - record-type, optional-type + object-type, record-type, optional-type function init() { int:Signed8|int:Unsigned32 startIndex = 1; @@ -4391,7 +4403,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -4405,7 +4417,7 @@ function init() { Test-Case: output Description: Test range expression with iterable object when the value of the first expression and the value of the second expression is equal. -Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, record-type, optional-type +Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, object-type, record-type, optional-type function init() { int startIndex = 5; @@ -4414,7 +4426,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -4428,7 +4440,7 @@ function init() { Test-Case: output Description: Test range expression when the value of the first expression is less than the value of the second expression. -Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, record-type, optional-type +Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, object-type, record-type, optional-type function init() { int startIndex = 5; @@ -4437,7 +4449,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -4449,8 +4461,8 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when the types of the values of the expressions are inferred. -Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, record-type, optional-type, var +Description: Test range expression with iterable object when the types of the expressions are inferred. +Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, object-type, record-type, optional-type, var function init() { var startIndex = 1; @@ -4459,7 +4471,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -4471,13 +4483,12 @@ function init() { } Test-Case: output -Description: Test range expression when the types of the values of the expressions and type of the range - expression are inferred. +Description: Test range expression when the types of the expressions and type of the range expression are inferred. Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, var function init() { - int startIndex = 1; - int endIndex = 10; + var startIndex = 1; + var endIndex = 10; int count = 0; var range = startIndex ..< endIndex; @@ -4490,14 +4501,14 @@ function init() { Test-Case: output Description: Test range expression at module level. -Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, record-type, optional-type, var +Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, object-type, record-type, optional-type, var int startIndex = 1; int endIndex = 10; object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ..< endIndex; @@ -4531,7 +4542,7 @@ function init() { Test-Case: output Description: Test iterable object returned by the range expression. -Labels: range-expr, int, DecimalNumber, object-type, optional-type, var, value:toBalString +Labels: range-expr, int, DecimalNumber, object-type, optional-type, var, value:toBalString, method-call-expr function init() { object { @@ -4558,7 +4569,7 @@ function init() { Test-Case: output Description: Test field and member access as expressions in range expression. Labels: range-expr, iterable-object, array-type, DecimalNumber, field-access-expr, int, list-constructor, - mapping-constructor, member-access-expr, module-type-defn, record-type, optional-type + mapping-constructor, member-access-expr, module-type-defn, object-type, record-type, optional-type type Record record { int x; @@ -4571,7 +4582,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = c.x ..< d[0]; @@ -4585,7 +4596,7 @@ function init() { Test-Case: output Description: Test function and method call as expressions in range expression. Labels: range-expr, iterable-object, DecimalNumber, int, explicit-new-expr, function-call-expr - module-class-defn, method-call-expr, record-type, optional-type + module-class-defn, method-call-expr, object-type, record-type, optional-type class Class { function getInt() returns int { @@ -4599,7 +4610,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = cls.getInt() ..< getInt(); @@ -4616,14 +4627,14 @@ function getInt() returns int { Test-Case: output Description: Test type cast expression as expressions in range expression. -Labels: range-expr, iterable-object, DecimalNumber, int, type-cast-expr, record-type, optional-type +Labels: range-expr, iterable-object, DecimalNumber, int, type-cast-expr, object-type, record-type, optional-type function init() { int count = 0; object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = 1.0 ..< 10.0; @@ -4637,14 +4648,14 @@ function init() { Test-Case: output Description: Test unary expressions as expressions in range expression. Labels: range-expr, iterable-object, DecimalNumber, int, unary-complement, unary-minus, unary-plus, - record-type, optional-type + object-type, record-type, optional-type function init() { int count = 0; object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = -10 ..< +2; @@ -4665,14 +4676,14 @@ function init() { Test-Case: output Description: Test additive expression as expressions in range expression. -Labels: range-expr, iterable-object, additive-expr, int, DecimalNumber, record-type, optional-type +Labels: range-expr, iterable-object, additive-expr, int, DecimalNumber, object-type, record-type, optional-type function init() { int count = 0; object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = 0+1 ..< 12-2; @@ -4685,14 +4696,15 @@ function init() { Test-Case: output Description: Test multiplicative expressions as expressions in range expression. -Labels: range-expr, iterable-object, DecimalNumber, int, multiplicative-expr, record-type, optional-type +Labels: range-expr, iterable-object, additive-expr, DecimalNumber, int, multiplicative-expr, object-type, record-type, + optional-type function init() { int count = 0; object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = 1*2 ..< 36/4; @@ -4713,14 +4725,15 @@ function init() { Test-Case: output Description: Test binary bitwise expressions as expressions in range expression. -Labels: range-expr, iterable-object, binary-bitwise-expr, DecimalNumber, int, record-type, optional-type +Labels: range-expr, iterable-object, binary-bitwise-expr, DecimalNumber, int, additive-expr, object-type, record-type, + optional-type function init() { int count = 0; object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = (1&2) ..< (4|8); @@ -4741,8 +4754,8 @@ function init() { Test-Case: output Description: Test checking expressions as expressions in range expression. -Labels: range-expr, iterable-object, check, checkpanic DecimalNumber, error, int, union-type, - record-type, optional-type +Labels: range-expr, iterable-object, check, checkpanic, DecimalNumber, error, additive-expr, int, union-type, + object-type, record-type, optional-type function init() returns error? { int|error startIndex = 2; @@ -4751,7 +4764,7 @@ function init() returns error? { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = check startIndex ..< checkpanic endIndex; @@ -4764,14 +4777,15 @@ function init() returns error? { Test-Case: output Description: Test let expression as expressions in range expression. -Labels: range-expr, iterable-object, DecimalNumber, int, let-expr, record-type, optional-type +Labels: range-expr, iterable-object, DecimalNumber, int, let-expr, additive-expr, object-type, record-type, + optional-type function init() { int count = 0; object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = (let int h1 = 10 in h1) ..< (let int h1 = 25 in h1); @@ -4784,14 +4798,15 @@ function init() { Test-Case: output Description: Test shift expressions as expressions in range expression. -Labels: range-expr, iterable-object, DecimalNumber, int, shift-expr, record-type, optional-type +Labels: range-expr, iterable-object, DecimalNumber, int, shift-expr, additive-expr, object-type, record-type, + optional-type function init() { int count = 0; object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = 1<<2 ..< 100>>4; @@ -4804,8 +4819,8 @@ function init() { Test-Case: output Description: Test conditional expressions as expressions in range expression. -Labels: range-expr, iterable-object, conditional-expr, DecimalNumber, error, int, nil-literal, - optional-type, union-type, record-type +Labels: range-expr, iterable-object, conditional-expr, DecimalNumber, error, int, additive-expr, nil-literal, + optional-type, union-type, object-type, record-type function init() { int|error a = 10; @@ -4814,7 +4829,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = (a is error ? 5 : a) ..< (b ?: 25); @@ -4827,15 +4842,15 @@ function init() { Test-Case: output Description: Test lang.int constants as expressions in range expression. -Labels: range-expr, iterable-object, int, int:SIGNED8_MAX_VALUE, int:UNSIGNED8_MAX_VALUE, - record-type, optional-type +Labels: range-expr, iterable-object, int, DecimalNumber, int:SIGNED8_MAX_VALUE, int:UNSIGNED8_MAX_VALUE, additive-expr, + object-type, record-type, optional-type function init() { int count = 0; object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = int:SIGNED8_MAX_VALUE ..< int:UNSIGNED8_MAX_VALUE; @@ -4848,20 +4863,65 @@ function init() { Test-Case: output Description: Test isolatedness of range expression. -Fail-Issue: ballerina-platform/ballerina-lang#33139 not isolated? prints false -Labels: range-expr, iterable-object, object-type, record-type, optional-type +Fail-Issue: ballerina-platform/ballerina-lang#33163 +Labels: range-expr, iterable-object, object-type, additive-expr, int, DecimalNumber, function-call-expr, record-type, + optional-type, lock-stmt + +isolated int i = 1; + +function init() { + int count = 0; + foreach int i in getRange() { + count = count + 1; + } + io:println(count); // @output 10 +} + +function getRange() returns object { + *object:Iterable; + public isolated function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; +} { + lock { + return i ..< i + 9; + } +} + +Test-Case: output +Description: Test isolatedness of range expression. +Fail-Issue: ballerina-platform/ballerina-lang#33163 +Labels: range-expr, object-type, record-type, int, optional-type, is-expr, any, type-cast-expr function init() { object { *object:Iterable; - public function iterator() returns object { - public function next() returns (record {|int value;|}?); + public isolated function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); }; } range = 1 ..< 10; io:println(range is isolated object {}); // @output true } +Test-Case: output +Description: Test isolatedness of range expression. +Fail-Issue: ballerina-platform/ballerina-lang#33163 +Labels: range-expr, object-type, int, DecimalNumber, record-type, optional-type, is-expr, method-call-expr + +function init() { + object { + public isolated function iterator() returns (object { + public isolated function next() returns (record {|int value;|}?); + }); + } range = 1 ..< 10; + + + io:println(range.iterator() is isolated function); // @output true + io:println(range.iterator().next() is isolated function); // @output true +} + + Test-Case: output Description: Test range expression with query expression. Labels: range-expr, array-type, int, DecimalNumber, query-expr @@ -4878,18 +4938,18 @@ Description: Test range expression when static type of either of the expression Labels: range-expr, int, DecimalFloatingPointNumber, string function init() { - _ = 1.0 ..< 10; // @error ..< not defined as static type of first expression is not a subtype of int - _ = 1 ..< 10.0; // @error ..< not defined as static type of second expression is not a subtype of int - _ = 1.0 ..< 10.0; // @error ..< not defined as static type of both expressions are not subtypes of int + _ = 1.0 ..< 10; // @error ..< not defined when static type of either of the expression is not a subtype of int + _ = 1 ..< 10.0; // @error ..< not defined when static type of either of the expression is not a subtype of int + _ = 1.0 ..< 10.0; // @error ..< not defined when static type of either of the expression is not a subtype of int - _ = "1" ..< 10; // @error ..< not defined as static type of first expression is not a subtype of int - _ = 1 ..< "10"; // @error ..< not defined as static type of second expression is not a subtype of int - _ = "1" ..< "10"; // @error ..< not defined as static type of both expressions are not subtypes of int + _ = "1" ..< 10; // @error ..< not defined when static type of either of the expression is not a subtype of int + _ = 1 ..< "10"; // @error ..< not defined when static type of either of the expression is not a subtype of int + _ = "1" ..< "10"; // @error ..< not defined when static type of either of the expression is not a subtype of int } Test-Case: error Description: Test assigning the result of range expression to an incompatible type. -Labels: range-expr, int, DecimalNumber, object-type +Labels: range-expr, int, DecimalNumber, object-type, float, record-type, optional-type function init() { int _ = 1 ..< 10; // @error result of a range expression is an object @@ -4904,7 +4964,7 @@ function init() { Test-Case: error Description: Test assigning the result of range expression to an incompatible type when the static type of the range expression is inferred. -Labels: range-expr, int, DecimalNumber, object-type, var, record-type, optional-type +Labels: range-expr, int, DecimalNumber, object-type, var, record-type, optional-type, float function init() { var a = 1 ..< 10; diff --git a/conformance/lang/expressions/range-expr/range_expr_inclusive.balt b/conformance/lang/expressions/range-expr/range_expr_inclusive.balt index 6ee547a0..50c038be 100644 --- a/conformance/lang/expressions/range-expr/range_expr_inclusive.balt +++ b/conformance/lang/expressions/range-expr/range_expr_inclusive.balt @@ -6,7 +6,7 @@ function init() { int startIndex = 0; int endIndex = 6; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 7 @@ -20,7 +20,7 @@ function init() { int startIndex = -6; int endIndex = -1; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 6 @@ -34,7 +34,7 @@ function init() { int startIndex = -10; int endIndex = 20; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 31 @@ -48,7 +48,7 @@ function init() { int startIndex = -7635315; int endIndex = 964732; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 8600048 @@ -62,7 +62,7 @@ function init() { int:Signed8 startIndex = 1; int:Signed8 endIndex = 10; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count += 1; } io:println(count); // @output 10 @@ -76,7 +76,7 @@ function init() { int:Signed8 startIndex = -10; int:Signed8 endIndex = -1; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 10 @@ -90,7 +90,7 @@ function init() { int:Signed8 startIndex = -10; int:Signed8 endIndex = 20; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 31 @@ -104,7 +104,7 @@ function init() { int:Signed16 startIndex = 1; int:Signed16 endIndex = 10; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 10 @@ -118,7 +118,7 @@ function init() { int:Signed16 startIndex = -10; int:Signed16 endIndex = -1; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 10 @@ -132,7 +132,7 @@ function init() { int:Signed16 startIndex = -10; int:Signed16 endIndex = 20; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 31 @@ -146,7 +146,7 @@ function init() { int:Signed32 startIndex = 1; int:Signed32 endIndex = 10; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 10 @@ -160,7 +160,7 @@ function init() { int:Signed32 startIndex = -10; int:Signed32 endIndex = -1; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 10 @@ -174,7 +174,7 @@ function init() { int:Signed32 startIndex = -10; int:Signed32 endIndex = 20; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 31 @@ -188,7 +188,7 @@ function init() { int:Unsigned8 startIndex = 1; int:Unsigned8 endIndex = 10; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 10 @@ -202,7 +202,7 @@ function init() { int:Unsigned16 startIndex = 1; int:Unsigned16 endIndex = 10; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 10 @@ -216,7 +216,7 @@ function init() { int:Unsigned32 startIndex = 1; int:Unsigned32 endIndex = 10; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 10 @@ -231,7 +231,7 @@ function init() { int startIndex = 1; int:Signed8 endIndex = 10; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 10 @@ -246,7 +246,7 @@ function init() { int startIndex = -10; int:Signed8 endIndex = -1; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 10 @@ -261,7 +261,7 @@ function init() { int startIndex = -10; int:Signed8 endIndex = 2; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 13 @@ -276,7 +276,7 @@ function init() { int startIndex = 1; int:Signed16 endIndex = 10; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 10 @@ -291,7 +291,7 @@ function init() { int startIndex = -10; int:Signed16 endIndex = -1; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 10 @@ -306,7 +306,7 @@ function init() { int startIndex = -10; int:Signed16 endIndex = 2; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 13 @@ -321,7 +321,7 @@ function init() { int startIndex = 1; int:Signed32 endIndex = 10; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 10 @@ -336,7 +336,7 @@ function init() { int startIndex = -10; int:Signed32 endIndex = -1; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 10 @@ -351,7 +351,7 @@ function init() { int startIndex = -10; int:Signed32 endIndex = 2; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 13 @@ -366,7 +366,7 @@ function init() { int startIndex = 1; int:Unsigned8 endIndex = 10; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 10 @@ -381,7 +381,7 @@ function init() { int startIndex = -10; int:Unsigned8 endIndex = 2; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 13 @@ -397,7 +397,7 @@ function init() { int startIndex = 1; byte endIndex = 10; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 10 @@ -413,7 +413,7 @@ function init() { int startIndex = -10; byte endIndex = 2; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 13 @@ -428,7 +428,7 @@ function init() { int startIndex = 1; int:Unsigned16 endIndex = 10; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 10 @@ -443,7 +443,7 @@ function init() { int startIndex = -10; int:Unsigned16 endIndex = 2; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 13 @@ -458,7 +458,7 @@ function init() { int startIndex = 1; int:Unsigned32 endIndex = 10; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 10 @@ -473,7 +473,7 @@ function init() { int startIndex = -10; int:Unsigned32 endIndex = 2; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 13 @@ -488,7 +488,7 @@ function init() { int:Signed8 startIndex = 1; int endIndex = 10; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 10 @@ -503,7 +503,7 @@ function init() { int:Signed8 startIndex = -10; int endIndex = -1; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 10 @@ -518,7 +518,7 @@ function init() { int:Signed8 startIndex = -10; int endIndex = 2; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 13 @@ -533,7 +533,7 @@ function init() { int:Signed8 startIndex = 1; int:Signed16 endIndex = 10; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 10 @@ -548,7 +548,7 @@ function init() { int:Signed8 startIndex = -10; int:Signed16 endIndex = -1; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 10 @@ -563,7 +563,7 @@ function init() { int:Signed8 startIndex = -10; int:Signed16 endIndex = 2; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 13 @@ -578,7 +578,7 @@ function init() { int:Signed8 startIndex = 1; int:Signed32 endIndex = 10; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 10 @@ -593,7 +593,7 @@ function init() { int:Signed8 startIndex = -10; int:Signed32 endIndex = -1; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 10 @@ -608,7 +608,7 @@ function init() { int:Signed8 startIndex = -10; int:Signed32 endIndex = 2; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 13 @@ -623,7 +623,7 @@ function init() { int:Signed8 startIndex = 1; int:Unsigned8 endIndex = 10; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 10 @@ -638,7 +638,7 @@ function init() { int:Signed8 startIndex = -10; int:Unsigned8 endIndex = 2; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 13 @@ -654,7 +654,7 @@ function init() { int:Signed8 startIndex = 1; byte endIndex = 10; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 10 @@ -670,7 +670,7 @@ function init() { int:Signed8 startIndex = -10; byte endIndex = 2; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 13 @@ -685,7 +685,7 @@ function init() { int:Signed8 startIndex = 1; int:Unsigned16 endIndex = 10; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 10 @@ -700,7 +700,7 @@ function init() { int:Signed8 startIndex = -10; int:Unsigned16 endIndex = 2; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 13 @@ -715,7 +715,7 @@ function init() { int:Signed8 startIndex = 1; int:Unsigned32 endIndex = 10; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 10 @@ -730,7 +730,7 @@ function init() { int:Signed8 startIndex = -10; int:Unsigned32 endIndex = 2; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 13 @@ -745,7 +745,7 @@ function init() { int:Signed16 startIndex = 1; int endIndex = 10; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 10 @@ -760,7 +760,7 @@ function init() { int:Signed16 startIndex = -10; int endIndex = -1; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 10 @@ -775,7 +775,7 @@ function init() { int:Signed16 startIndex = -10; int endIndex = 2; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 13 @@ -790,7 +790,7 @@ function init() { int:Signed16 startIndex = 1; int:Signed8 endIndex = 10; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 10 @@ -805,7 +805,7 @@ function init() { int:Signed16 startIndex = -10; int:Signed8 endIndex = -1; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 10 @@ -820,7 +820,7 @@ function init() { int:Signed16 startIndex = -10; int:Signed8 endIndex = 2; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 13 @@ -835,7 +835,7 @@ function init() { int:Signed16 startIndex = 1; int:Signed32 endIndex = 10; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 10 @@ -850,7 +850,7 @@ function init() { int:Signed16 startIndex = -10; int:Signed32 endIndex = -1; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 10 @@ -865,7 +865,7 @@ function init() { int:Signed16 startIndex = -10; int:Signed32 endIndex = 2; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 13 @@ -880,7 +880,7 @@ function init() { int:Signed16 startIndex = 1; int:Unsigned8 endIndex = 10; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 10 @@ -895,7 +895,7 @@ function init() { int:Signed16 startIndex = -10; int:Unsigned8 endIndex = 2; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 13 @@ -911,7 +911,7 @@ function init() { int:Signed16 startIndex = 1; byte endIndex = 10; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 10 @@ -927,7 +927,7 @@ function init() { int:Signed16 startIndex = -10; byte endIndex = 2; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 13 @@ -942,7 +942,7 @@ function init() { int:Signed16 startIndex = 1; int:Unsigned16 endIndex = 10; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 10 @@ -957,7 +957,7 @@ function init() { int:Signed16 startIndex = -10; int:Unsigned16 endIndex = 2; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 13 @@ -972,7 +972,7 @@ function init() { int:Signed16 startIndex = 1; int:Unsigned32 endIndex = 10; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 10 @@ -987,7 +987,7 @@ function init() { int:Signed16 startIndex = -10; int:Unsigned32 endIndex = 2; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 13 @@ -1002,7 +1002,7 @@ function init() { int:Signed32 startIndex = 1; int endIndex = 10; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 10 @@ -1017,7 +1017,7 @@ function init() { int:Signed32 startIndex = -10; int endIndex = -1; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 10 @@ -1032,7 +1032,7 @@ function init() { int:Signed32 startIndex = -10; int endIndex = 2; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 13 @@ -1047,7 +1047,7 @@ function init() { int:Signed32 startIndex = 1; int:Signed8 endIndex = 10; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 10 @@ -1062,7 +1062,7 @@ function init() { int:Signed32 startIndex = -10; int:Signed8 endIndex = -1; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 10 @@ -1077,7 +1077,7 @@ function init() { int:Signed32 startIndex = -10; int:Signed8 endIndex = 2; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 13 @@ -1092,7 +1092,7 @@ function init() { int:Signed32 startIndex = 1; int:Signed16 endIndex = 10; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 10 @@ -1107,7 +1107,7 @@ function init() { int:Signed32 startIndex = -10; int:Signed16 endIndex = -1; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 10 @@ -1122,7 +1122,7 @@ function init() { int:Signed32 startIndex = -10; int:Signed16 endIndex = 2; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 13 @@ -1137,7 +1137,7 @@ function init() { int:Signed32 startIndex = 1; int:Unsigned8 endIndex = 10; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 10 @@ -1152,7 +1152,7 @@ function init() { int:Signed32 startIndex = -10; int:Unsigned8 endIndex = 2; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 13 @@ -1168,7 +1168,7 @@ function init() { int:Signed32 startIndex = 1; byte endIndex = 10; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 10 @@ -1184,7 +1184,7 @@ function init() { int:Signed32 startIndex = -10; byte endIndex = 2; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 13 @@ -1199,7 +1199,7 @@ function init() { int:Signed32 startIndex = 1; int:Unsigned16 endIndex = 10; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 10 @@ -1214,7 +1214,7 @@ function init() { int:Signed32 startIndex = -10; int:Unsigned16 endIndex = 2; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 13 @@ -1229,7 +1229,7 @@ function init() { int:Signed32 startIndex = 1; int:Unsigned32 endIndex = 10; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 10 @@ -1244,7 +1244,7 @@ function init() { int:Signed32 startIndex = -10; int:Unsigned32 endIndex = 2; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 13 @@ -1259,7 +1259,7 @@ function init() { int:Unsigned8 startIndex = 1; int endIndex = 10; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 10 @@ -1274,7 +1274,7 @@ function init() { int:Unsigned8 startIndex = 1; int:Signed8 endIndex = 10; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 10 @@ -1289,7 +1289,7 @@ function init() { int:Unsigned8 startIndex = 1; int:Signed16 endIndex = 10; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 10 @@ -1304,7 +1304,7 @@ function init() { int:Unsigned8 startIndex = 1; int:Signed32 endIndex = 10; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 10 @@ -1320,7 +1320,7 @@ function init() { int:Unsigned8 startIndex = 1; byte endIndex = 10; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 10 @@ -1335,7 +1335,7 @@ function init() { int:Unsigned8 startIndex = 1; int:Unsigned16 endIndex = 10; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 10 @@ -1350,7 +1350,7 @@ function init() { int:Unsigned8 startIndex = 1; int:Unsigned32 endIndex = 10; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 10 @@ -1365,7 +1365,7 @@ function init() { int:Unsigned16 startIndex = 1; int endIndex = 10; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 10 @@ -1380,7 +1380,7 @@ function init() { int:Unsigned16 startIndex = 1; int:Signed8 endIndex = 10; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 10 @@ -1395,7 +1395,7 @@ function init() { int:Unsigned16 startIndex = 1; int:Signed16 endIndex = 10; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 10 @@ -1410,7 +1410,7 @@ function init() { int:Unsigned16 startIndex = 1; int:Signed32 endIndex = 10; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 10 @@ -1425,7 +1425,7 @@ function init() { int:Unsigned16 startIndex = 1; int:Unsigned8 endIndex = 10; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 10 @@ -1441,7 +1441,7 @@ function init() { int:Unsigned16 startIndex = 1; byte endIndex = 10; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 10 @@ -1456,7 +1456,7 @@ function init() { int:Unsigned16 startIndex = 1; int:Unsigned32 endIndex = 10; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 10 @@ -1471,7 +1471,7 @@ function init() { int:Unsigned32 startIndex = 1; int endIndex = 10; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 10 @@ -1486,7 +1486,7 @@ function init() { int:Unsigned32 startIndex = 1; int:Signed8 endIndex = 10; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 10 @@ -1501,7 +1501,7 @@ function init() { int:Unsigned32 startIndex = 1; int:Signed16 endIndex = 10; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 10 @@ -1516,7 +1516,7 @@ function init() { int:Unsigned32 startIndex = 1; int:Signed32 endIndex = 10; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 10 @@ -1531,7 +1531,7 @@ function init() { int:Unsigned32 startIndex = 1; int:Unsigned8 endIndex = 10; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 10 @@ -1547,7 +1547,7 @@ function init() { int:Unsigned32 startIndex = 1; byte endIndex = 10; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 10 @@ -1562,7 +1562,7 @@ function init() { int:Unsigned32 startIndex = 1; int:Unsigned16 endIndex = 10; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 10 @@ -1580,7 +1580,7 @@ function init() { Ints startIndex = 1; Ints endIndex = 10; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 10 @@ -1595,7 +1595,7 @@ function init() { int:Signed8|int:Unsigned32 startIndex = 1; int:Signed8|int:Unsigned32 endIndex = 10; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 10 @@ -1611,7 +1611,7 @@ function init() { int endIndex = 5; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 1 @@ -1627,14 +1627,14 @@ function init() { int endIndex = 3; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 0 } Test-Case: output -Description: Test range expression when the types expressions are inferred. +Description: Test range expression when the types of the expressions are inferred. Labels: range-expr, iterable-inclusive, int, DecimalNumber, additive-expr, var function init() { @@ -1642,7 +1642,7 @@ function init() { var endIndex = 10; int count = 0; - foreach int i in startIndex...endIndex { + foreach int i in startIndex ... endIndex { count = count + 1; } io:println(count); // @output 10 @@ -1662,7 +1662,7 @@ function init() { int[] d = [30, 40]; int count = 0; - foreach int i in c.x...d[0] { + foreach int i in c.x ... d[0] { count = count + 1; } io:println(count); // @output 21 @@ -1683,7 +1683,7 @@ function init() { Class cls = new Class(); int count = 0; - foreach int i in cls.getInt()...getInt() { + foreach int i in cls.getInt() ... getInt() { count = count + 1; } io:println(count); // @output 10 @@ -1695,12 +1695,12 @@ function getInt() returns int { Test-Case: output Description: Test type cast expression as expressions in range expression. -Labels: range-expr, iterable-inclusive, DecimalNumber, int, type-cast-expr +Labels: range-expr, iterable-inclusive, DecimalNumber, int, type-cast-expr, additive-expr function init() { int count = 0; - foreach int i in 1.0...10.0 { + foreach int i in 1.0 ... 10.0 { count = count + 1; } io:println(count); // @output 10 @@ -1713,13 +1713,13 @@ Labels: range-expr, iterable-inclusive, DecimalNumber, int, unary-complement, un function init() { int count = 0; - foreach int i in -10...+2 { + foreach int i in -10 ... +2 { count = count + 1; } io:println(count); // @output 13 count = 0; - foreach int i in -10...~2 { + foreach int i in -10 ... ~2 { count = count + 1; } io:println(count); // @output 8 @@ -1732,7 +1732,7 @@ Labels: range-expr, iterable-inclusive, additive-expr, int, DecimalNumber function init() { int count = 0; - foreach int i in 0+1...12-2 { + foreach int i in 0+1 ... 12-2 { count = count + 1; } io:println(count); // @output 10 @@ -1745,13 +1745,13 @@ Labels: range-expr, iterable-inclusive, DecimalNumber, int, multiplicative-expr function init() { int count = 0; - foreach int i in 1*2...36/4 { + foreach int i in 1*2 ... 36/4 { count = count + 1; } io:println(count); // @output 8 count = 0; - foreach int i in 34%5...4*5 { + foreach int i in 34%5 ... 4*5 { count = count + 1; } io:println(count); // @output 17 @@ -1764,13 +1764,13 @@ Labels: range-expr, iterable-inclusive, binary-bitwise-expr, DecimalNumber, int function init() { int count = 0; - foreach int i in (1&2)...(4|8) { + foreach int i in (1&2) ... (4|8) { count = count + 1; } io:println(count); // @output 13 count = 0; - foreach int i in (6|3)...(2^8) { + foreach int i in (6|3) ... (2^8) { count = count + 1; } io:println(count); // @output 4 @@ -1778,14 +1778,14 @@ function init() { Test-Case: output Description: Test checking expressions as expressions in range expression. -Labels: range-expr, iterable-inclusive, check, checkpanic DecimalNumber, error, int, union-type +Labels: range-expr, iterable-inclusive, check, checkpanic, DecimalNumber, error, int, union-type, optional-type function init() returns error? { int|error startIndex = 2; int|error endIndex = 12; int count = 0; - foreach int i in check startIndex...checkpanic endIndex { + foreach int i in check startIndex ... checkpanic endIndex { count = count + 1; } io:println(count); // @output 11 @@ -1798,7 +1798,7 @@ Labels: range-expr, iterable-inclusive, DecimalNumber, int, let-expr function init() { int count = 0; - foreach int i in (let int h1 = 10 in h1)...(let int h1 = 25 in h1) { + foreach int i in (let int h1 = 10 in h1) ... (let int h1 = 25 in h1) { count = count + 1; } io:println(count); // @output 16 @@ -1811,7 +1811,7 @@ Labels: range-expr, iterable-inclusive, DecimalNumber, int, shift-expr function init() { int count = 0; - foreach int i in 1 << 2...100 >> 4 { + foreach int i in 1 << 2 ... 100 >> 4 { count = count + 1; } io:println(count); // @output 3 @@ -1827,7 +1827,7 @@ function init() { int? b = (); int count = 0; - foreach int i in (a is error ? 5 : a)...(b ?: 25) { + foreach int i in (a is error ? 5 : a) ... (b ?: 25) { count = count + 1; } io:println(count); // @output 16 @@ -1840,7 +1840,7 @@ Labels: range-expr, iterable-inclusive, int, int:SIGNED8_MAX_VALUE, int:UNSIGNED function init() { int count = 0; - foreach int i in int:SIGNED8_MAX_VALUE...int:UNSIGNED8_MAX_VALUE { + foreach int i in int:SIGNED8_MAX_VALUE ... int:UNSIGNED8_MAX_VALUE { count = count + 1; } io:println(count); // @output 129 @@ -1848,7 +1848,7 @@ function init() { Test-Case: output Description: Test range expression with iterable object when values of expressions are positive integers -Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, record-type, optional-type +Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, object-type, record-type, optional-type function init() { int startIndex = 0; @@ -1857,7 +1857,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ... endIndex; @@ -1870,7 +1870,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when values of expressions are negative integers -Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, record-type, optional-type, unary-minus +Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, object-type, record-type, + optional-type, unary-minus function init() { int startIndex = -6; @@ -1879,7 +1880,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ... endIndex; @@ -1892,7 +1893,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when values of expressions are integers -Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, record-type, optional-type, unary-minus +Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, object-type, record-type, + optional-type, unary-minus function init() { int startIndex = -10; @@ -1901,7 +1903,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ... endIndex; @@ -1914,7 +1916,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when values of both expressions are integers -Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, record-type, optional-type, unary-minus +Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, object-type, record-type, + optional-type, unary-minus function init() { int startIndex = -7635315; @@ -1923,7 +1926,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ... endIndex; @@ -1936,7 +1939,7 @@ function init() { Test-Case: output Description: Test range expression with iterable object when values of expressions are positive Signed8 integers -Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, int:Signed8, additive-expr, +Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, int:Signed8, object-type, record-type, optional-type function init() { @@ -1945,7 +1948,7 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; } range = startIndex ... endIndex; @@ -1959,7 +1962,7 @@ function init() { Test-Case: output Description: Test range expression with iterable object when values of expressions are negative Signed8 integers -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, additive-expr, +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -1969,10 +1972,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -1982,7 +1985,7 @@ function init() { Test-Case: output Description: Test range expression with iterable object when values of expressions are Signed8 integers -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, additive-expr, +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -1992,10 +1995,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -2005,7 +2008,7 @@ function init() { Test-Case: output Description: Test range expression with iterable object when values of expressions are positive Signed16 integers -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, object-type, record-type, optional-type function init() { @@ -2015,10 +2018,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -2028,7 +2031,7 @@ function init() { Test-Case: output Description: Test range expression with iterable object when values of expressions are negative Signed16 integers -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, record-type, +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -2038,10 +2041,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -2051,7 +2054,7 @@ function init() { Test-Case: output Description: Test range expression with iterable object when values of expressions are Signed16 integers -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, record-type, +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -2061,10 +2064,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -2074,7 +2077,7 @@ function init() { Test-Case: output Description: Test range expression with iterable object when values of expressions are positive Signed32 integers -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, record-type, +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, object-type, record-type, optional-type function init() { @@ -2084,10 +2087,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -2097,7 +2100,7 @@ function init() { Test-Case: output Description: Test range expression with iterable object when values of expressions are negative Signed32 integers -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, record-type, +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -2107,10 +2110,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -2120,7 +2123,7 @@ function init() { Test-Case: output Description: Test range expression with iterable object when values of expressions are Signed32 integers -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, record-type, +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -2130,10 +2133,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -2143,7 +2146,7 @@ function init() { Test-Case: output Description: Test range expression with iterable object when values of expressions are Unsigned8 integers -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, additive-expr, record-type, +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, additive-expr, object-type, record-type, optional-type function init() { @@ -2153,10 +2156,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -2166,7 +2169,7 @@ function init() { Test-Case: output Description: Test range expression with iterable object when values of expressions are Unsigned16 integers -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, additive-expr, record-type, +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -2176,10 +2179,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -2189,7 +2192,7 @@ function init() { Test-Case: output Description: Test range expression with iterable object when values of expressions are Unsigned32 integers -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, additive-expr, record-type, +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -2199,10 +2202,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -2213,7 +2216,7 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a positive integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, additive-expr, record-type, +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, additive-expr, object-type, record-type, optional-type function init() { @@ -2223,10 +2226,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -2237,7 +2240,7 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a negative integer and value of the second expression is a negative Signed8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, additive-expr, record-type, +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -2247,10 +2250,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -2261,7 +2264,7 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a negative integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, additive-expr, record-type, +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -2271,10 +2274,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -2285,7 +2288,7 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a positive integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, record-type, +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, object-type, record-type, optional-type function init() { @@ -2295,10 +2298,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -2309,7 +2312,7 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a negative integer and value of the second expression is a negative Signed16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, record-type, +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -2319,10 +2322,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -2333,7 +2336,7 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a negative integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, record-type, +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -2343,10 +2346,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -2357,7 +2360,7 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a positive integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, record-type, +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, object-type, record-type, optional-type function init() { @@ -2367,10 +2370,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -2381,7 +2384,7 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a negative integer and value of the second expression is a negative Signed32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, record-type, +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -2391,10 +2394,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -2405,7 +2408,7 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a negative integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, record-type, +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -2415,10 +2418,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -2429,7 +2432,7 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a positive integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, additive-expr, record-type, +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, additive-expr, object-type, record-type, optional-type function init() { @@ -2439,10 +2442,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -2453,7 +2456,7 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a negative integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, additive-expr, record-type, +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -2463,10 +2466,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -2478,7 +2481,7 @@ Test-Case: output Description: Test range expression with iterable object when value of the first expression is a positive integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, int, DecimalNumber, byte, additive-expr, record-type, optional-type +Labels: range-expr, iterable-object, int, DecimalNumber, byte, additive-expr, object-type, record-type, optional-type function init() { int startIndex = 1; @@ -2487,10 +2490,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -2502,7 +2505,8 @@ Test-Case: output Description: Test range expression with iterable object when value of the first expression is a negative integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, int, DecimalNumber, byte, additive-expr, record-type, optional-type, unary-minus +Labels: range-expr, iterable-object, int, DecimalNumber, byte, additive-expr, object-type, record-type, + optional-type, unary-minus function init() { int startIndex = -10; @@ -2511,10 +2515,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -2525,7 +2529,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a positive integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, additive-expr, record-type, optional-type +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, additive-expr, object-type, + record-type, optional-type function init() { int startIndex = 1; @@ -2534,10 +2539,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -2548,8 +2553,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a negative integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, additive-expr, record-type, optional-type, - unary-minus +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, additive-expr, object-type, + record-type, optional-type, unary-minus function init() { int startIndex = -10; @@ -2558,10 +2563,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -2572,7 +2577,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a positive integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, additive-expr, record-type, optional-type +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, additive-expr, object-type, + record-type, optional-type function init() { int startIndex = 1; @@ -2581,10 +2587,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -2595,7 +2601,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a negative integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, additive-expr, record-type, optional-type, +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, additive-expr, object-type, + record-type, optional-type, unary-minus function init() { @@ -2605,10 +2612,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -2619,7 +2626,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a positive Signed8 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, additive-expr, record-type, optional-type +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, additive-expr, object-type, record-type, + optional-type function init() { int:Signed8 startIndex = 1; @@ -2628,10 +2636,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -2642,8 +2650,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a negative integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, additive-expr, record-type, optional-type, - unary-minus +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, additive-expr, object-type, record-type, + optional-type, unary-minus function init() { int:Signed8 startIndex = -10; @@ -2652,10 +2660,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -2666,8 +2674,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, additive-expr, record-type, optional-type, - unary-minus +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, additive-expr, object-type, record-type, + optional-type, unary-minus function init() { int:Signed8 startIndex = -10; @@ -2676,10 +2684,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -2690,8 +2698,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a positive Signed8 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Signed16, additive-expr, record-type, - optional-type +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Signed16, additive-expr, object-type, + record-type, optional-type function init() { int:Signed8 startIndex = 1; @@ -2700,10 +2708,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -2714,8 +2722,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a negative Signed16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Signed16, additive-expr, record-type, - optional-type, unary-minus +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Signed16, additive-expr, object-type, + record-type, optional-type, unary-minus function init() { int:Signed8 startIndex = -10; @@ -2724,10 +2732,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -2738,8 +2746,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Signed16, additive-expr, record-type, - optional-type, unary-minus +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Signed16, additive-expr, object-type, + record-type, optional-type, unary-minus function init() { int:Signed8 startIndex = -10; @@ -2748,10 +2756,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -2762,8 +2770,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a positive Signed8 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Signed32, additive-expr, record-type, - optional-type +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Signed32, additive-expr, object-type, + record-type, optional-type function init() { int:Signed8 startIndex = 1; @@ -2772,10 +2780,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { @@ -2787,8 +2795,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a negative Signed32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Signed32, additive-expr, record-type, - optional-type, unary-minus +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Signed32, additive-expr, object-type, + record-type, optional-type, unary-minus function init() { int:Signed8 startIndex = -10; @@ -2797,10 +2805,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -2811,8 +2819,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Signed32, additive-expr, record-type, - optional-type, unary-minus +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Signed32, additive-expr, object-type, + record-type, optional-type, unary-minus function init() { int:Signed8 startIndex = -10; @@ -2821,10 +2829,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -2835,8 +2843,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a positive Signed8 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Unsigned8, additive-expr, record-type, - optional-type +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Unsigned8, additive-expr, object-type, + record-type, optional-type function init() { int:Signed8 startIndex = 1; @@ -2845,10 +2853,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { @@ -2860,8 +2868,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Unsigned8, additive-expr, record-type, - optional-type, unary-minus +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Unsigned8, additive-expr, object-type, + record-type, optional-type, unary-minus function init() { int:Signed8 startIndex = -10; @@ -2870,10 +2878,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -2882,10 +2890,10 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a positive Signed8 integer and value of the - second expression is a byte. +Description: Test range expression with iterable object when value of the first expression is a positive Signed8 integer + and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, byte, additive-expr, record-type, +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, byte, additive-expr, object-type, record-type, optional-type function init() { @@ -2895,10 +2903,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -2910,7 +2918,7 @@ Test-Case: output Description: Test range expression with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, byte, additive-expr, record-type, +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, byte, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -2920,10 +2928,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -2934,8 +2942,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a positive Signed8 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Unsigned16, additive-expr, record-type, - optional-type +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Unsigned16, additive-expr, object-type, + record-type, optional-type function init() { int:Signed8 startIndex = 1; @@ -2944,10 +2952,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -2958,8 +2966,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Unsigned16, additive-expr, record-type, - optional-type, unary-minus +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Unsigned16, additive-expr, object-type, + record-type, optional-type, unary-minus function init() { int:Signed8 startIndex = -10; @@ -2968,10 +2976,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -2980,10 +2988,10 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a positive Signed8 integer and value of the - second expression is a Unsigned32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Unsigned32, additive-expr, record-type, - optional-type +Description: Test range expression with iterable object when value of the first expression is a positive Signed8 + integer and value of the second expression is a Unsigned32 integer. +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Unsigned32, additive-expr, object-type, + record-type, optional-type function init() { int:Signed8 startIndex = 1; @@ -2992,10 +3000,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -3006,8 +3014,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Unsigned32, additive-expr, record-type, - optional-type, unary-minus +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Unsigned32, additive-expr, object-type, + record-type, optional-type, unary-minus function init() { int:Signed8 startIndex = -10; @@ -3016,10 +3024,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -3030,7 +3038,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a positive Signed16 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, record-type, optional-type +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, object-type, record-type, + optional-type function init() { int:Signed16 startIndex = 1; @@ -3039,10 +3048,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -3053,8 +3062,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a negative integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, record-type, optional-type, - unary-minus +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, object-type, record-type, + optional-type, unary-minus function init() { int:Signed16 startIndex = -10; @@ -3063,10 +3072,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -3077,8 +3086,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, record-type, optional-type, - unary-minus +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, object-type, record-type, + optional-type, unary-minus function init() { int:Signed16 startIndex = -10; @@ -3087,10 +3096,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -3101,8 +3110,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a positive Signed16 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Signed8, additive-expr, record-type, - optional-type +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Signed8, additive-expr, object-type, + record-type, optional-type function init() { int:Signed16 startIndex = 1; @@ -3111,10 +3120,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -3125,8 +3134,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a negative Signed8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Signed8, additive-expr, record-type, - optional-type, unary-minus +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Signed8, additive-expr, object-type, + record-type, optional-type, unary-minus function init() { int:Signed16 startIndex = -10; @@ -3135,10 +3144,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -3149,8 +3158,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Signed8, additive-expr, record-type, - optional-type, unary-minus +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Signed8, additive-expr, object-type, + record-type, optional-type, unary-minus function init() { int:Signed16 startIndex = -10; @@ -3159,10 +3168,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -3173,8 +3182,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a positive Signed16 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Signed32, additive-expr, record-type, - optional-type +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Signed32, additive-expr, object-type, + record-type, optional-type function init() { int:Signed16 startIndex = 1; @@ -3183,10 +3192,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -3197,8 +3206,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a negative Signed32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Signed32, additive-expr, record-type, - optional-type, unary-minus +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Signed32, additive-expr, object-type, + record-type, optional-type, unary-minus function init() { int:Signed16 startIndex = -10; @@ -3207,10 +3216,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -3221,8 +3230,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Signed32, additive-expr, record-type, - optional-type, unary-minus +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Signed32, additive-expr, object-type, + record-type, optional-type, unary-minus function init() { int:Signed16 startIndex = -10; @@ -3231,10 +3240,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -3245,8 +3254,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a positive Signed16 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Unsigned8, additive-expr, record-type, - optional-type +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Unsigned8, additive-expr, object-type, + record-type, optional-type function init() { int:Signed16 startIndex = 1; @@ -3255,10 +3264,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -3269,8 +3278,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Unsigned8, additive-expr, record-type, - optional-type, unary-minus +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Unsigned8, additive-expr, object-type, + record-type, optional-type, unary-minus function init() { int:Signed16 startIndex = -10; @@ -3279,10 +3288,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -3294,7 +3303,7 @@ Test-Case: output Description: Test range expression with iterable object when value of the first expression is a positive Signed16 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, byte, additive-expr, record-type, +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, byte, additive-expr, object-type, record-type, optional-type function init() { @@ -3304,10 +3313,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -3319,7 +3328,7 @@ Test-Case: output Description: Test range expression with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, byte, additive-expr, record-type, +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, byte, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -3329,10 +3338,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -3343,8 +3352,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a positive Signed16 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Unsigned16, additive-expr, record-type, - optional-type +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Unsigned16, additive-expr, object-type, + record-type, optional-type function init() { int:Signed16 startIndex = 1; @@ -3353,10 +3362,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -3367,8 +3376,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Unsigned16, additive-expr, record-type, - optional-type, unary-minus +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Unsigned16, additive-expr, object-type, + record-type, optional-type, unary-minus function init() { int:Signed16 startIndex = -10; @@ -3377,10 +3386,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -3391,8 +3400,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a positive Signed16 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Unsigned32, additive-expr, record-type, - optional-type +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Unsigned32, additive-expr, object-type, + record-type, optional-type function init() { int:Signed16 startIndex = 1; @@ -3401,10 +3410,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -3415,8 +3424,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Unsigned32, additive-expr, record-type, - optional-type, unary-minus +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Unsigned32, additive-expr, object-type, + record-type, optional-type, unary-minus function init() { int:Signed16 startIndex = -10; @@ -3425,10 +3434,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -3439,7 +3448,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a positive Signed32 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, record-type, optional-type +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, object-type, record-type, + optional-type function init() { int:Signed32 startIndex = 1; @@ -3448,10 +3458,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -3462,8 +3472,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a negative integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, record-type, optional-type, - unary-minus +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, object-type, record-type, + optional-type, unary-minus function init() { int:Signed32 startIndex = -10; @@ -3472,10 +3482,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -3486,8 +3496,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, record-type, optional-type, - unary-minus +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, object-type, record-type, + optional-type, unary-minus function init() { int:Signed32 startIndex = -10; @@ -3496,10 +3506,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -3510,8 +3520,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a positive Signed32 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Signed8, additive-expr, record-type, - optional-type +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Signed8, additive-expr, object-type, + record-type, optional-type function init() { int:Signed32 startIndex = 1; @@ -3520,10 +3530,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -3534,8 +3544,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a negative Signed8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Signed8, additive-expr, record-type, - optional-type, unary-minus +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Signed8, additive-expr, object-type, + record-type, optional-type, unary-minus function init() { int:Signed32 startIndex = -10; @@ -3544,10 +3554,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -3558,8 +3568,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Signed8, additive-expr, record-type, - optional-type, unary-minus +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Signed8, additive-expr, object-type, + record-type, optional-type, unary-minus function init() { int:Signed32 startIndex = -10; @@ -3568,10 +3578,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -3582,8 +3592,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a positive Signed32 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Signed16, additive-expr, record-type, - optional-type +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Signed16, additive-expr, object-type, + record-type, optional-type function init() { int:Signed32 startIndex = 1; @@ -3592,10 +3602,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -3606,8 +3616,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a negative Signed16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Signed16, additive-expr, record-type, - optional-type, unary-minus +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Signed16, additive-expr, object-type, + record-type, optional-type, unary-minus function init() { int:Signed32 startIndex = -10; @@ -3616,10 +3626,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -3630,8 +3640,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Signed16, additive-expr, record-type, - optional-type, unary-minus +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Signed16, additive-expr, object-type, + record-type, optional-type, unary-minus function init() { int:Signed32 startIndex = -10; @@ -3640,10 +3650,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -3654,8 +3664,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a positive Signed32 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Unsigned8, additive-expr, record-type, - optional-type +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Unsigned8, additive-expr, object-type, + record-type, optional-type function init() { int:Signed32 startIndex = 1; @@ -3664,10 +3674,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -3678,8 +3688,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Unsigned8, additive-expr, record-type, - optional-type, unary-minus +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Unsigned8, additive-expr, object-type, + record-type, optional-type, unary-minus function init() { int:Signed32 startIndex = -10; @@ -3688,10 +3698,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -3703,7 +3713,7 @@ Test-Case: output Description: Test range expression with iterable object when value of the first expression is a positive Signed32 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, bye, additive-expr, record-type, +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, bye, additive-expr, object-type, record-type, optional-type function init() { @@ -3713,10 +3723,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -3728,7 +3738,7 @@ Test-Case: output Description: Test range expression with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, byte, additive-expr, record-type, +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, byte, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -3738,10 +3748,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -3752,8 +3762,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a positive Signed32 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Unsigned16, additive-expr, record-type, - optional-type +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Unsigned16, additive-expr, object-type, + record-type, optional-type function init() { int:Signed32 startIndex = 1; @@ -3762,10 +3772,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -3776,8 +3786,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Unsigned16, additive-expr, record-type, - optional-type, unary-minus +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Unsigned16, additive-expr, object-type, + record-type, optional-type, unary-minus function init() { int:Signed32 startIndex = -10; @@ -3786,10 +3796,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -3800,8 +3810,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a positive Signed32 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Unsigned32, additive-expr, record-type, - optional-type +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Unsigned32, additive-expr, object-type, + record-type, optional-type function init() { int:Signed32 startIndex = 1; @@ -3810,10 +3820,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -3824,8 +3834,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Unsigned32, additive-expr, record-type, - optional-type, unary-minus +Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Unsigned32, additive-expr, object-type, + record-type, optional-type, unary-minus function init() { int:Signed32 startIndex = -10; @@ -3834,10 +3844,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -3848,7 +3858,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a Unsigned8 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, additive-expr, record-type, optional-type +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, additive-expr, object-type, record-type, + optional-type function init() { int:Unsigned8 startIndex = 1; @@ -3857,10 +3868,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -3871,8 +3882,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a Unsigned8 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, int:Signed8, additive-expr, record-type, - optional-type +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, int:Signed8, additive-expr, object-type, + record-type, optional-type function init() { int:Unsigned8 startIndex = 1; @@ -3881,10 +3892,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { @@ -3896,8 +3907,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a Unsigned8 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, int:Signed16, additive-expr, record-type, - optional-type +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, int:Signed16, additive-expr, object-type, + record-type, optional-type function init() { int:Unsigned8 startIndex = 1; @@ -3906,10 +3917,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -3920,8 +3931,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a Unsigned8 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, int:Signed32, additive-expr, record-type, - optional-type +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, int:Signed32, additive-expr, object-type, + record-type, optional-type function init() { int:Unsigned8 startIndex = 1; @@ -3930,10 +3941,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -3945,7 +3956,7 @@ Test-Case: output Description: Test range expression with iterable object when value of the first expression is a Unsigned8 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, byte, additive-expr, record-type, +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, byte, additive-expr, object-type, record-type, optional-type function init() { @@ -3955,10 +3966,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -3969,8 +3980,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a Unsigned8 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, int:Unsigned16, additive-expr, record-type, - optional-type +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, int:Unsigned16, additive-expr, object-type, + record-type, optional-type function init() { int:Unsigned8 startIndex = 1; @@ -3979,10 +3990,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -3993,8 +4004,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a Unsigned8 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, int:Unsigned32, additive-expr, record-type, - optional-type +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, int:Unsigned32, additive-expr, object-type, + record-type, optional-type function init() { int:Unsigned8 startIndex = 1; @@ -4003,10 +4014,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { @@ -4018,7 +4029,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a Unsigned16 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, additive-expr, record-type, optional-type +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, additive-expr, object-type, record-type, + optional-type function init() { int:Unsigned16 startIndex = 1; @@ -4027,10 +4039,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -4041,8 +4053,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a Unsigned16 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, int:Signed8, additive-expr, record-type, - optional-type +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, int:Signed8, additive-expr, object-type, + record-type, optional-type function init() { int:Unsigned16 startIndex = 1; @@ -4051,10 +4063,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -4065,8 +4077,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a Unsigned16 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, int:Signed16, additive-expr, record-type, - optional-type +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, int:Signed16, additive-expr, object-type, + record-type, optional-type function init() { int:Unsigned16 startIndex = 1; @@ -4075,10 +4087,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -4089,8 +4101,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a Unsigned16 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, int:Signed32, additive-expr, record-type, - optional-type +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, int:Signed32, additive-expr, object-type, + record-type, optional-type function init() { int:Unsigned16 startIndex = 1; @@ -4099,10 +4111,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -4113,8 +4125,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a Unsigned16 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, int:Unsigned8, additive-expr, record-type, - optional-type +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, int:Unsigned8, additive-expr, object-type, + record-type, optional-type function init() { int:Unsigned16 startIndex = 1; @@ -4123,10 +4135,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { @@ -4139,7 +4151,7 @@ Test-Case: output Description: Test range expression with iterable object when value of the first expression is a Unsigned16 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, byte, additive-expr, record-type, +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, byte, additive-expr, object-type, record-type, optional-type function init() { @@ -4149,10 +4161,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -4163,8 +4175,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a Unsigned16 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, int:Unsigned32, additive-expr, record-type, - optional-type +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, int:Unsigned32, additive-expr, object-type, + record-type, optional-type function init() { int:Unsigned16 startIndex = 1; @@ -4173,10 +4185,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -4187,7 +4199,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a Unsigned32 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, additive-expr, record-type, optional-type +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, additive-expr, object-type, record-type, + optional-type function init() { int:Unsigned32 startIndex = 1; @@ -4196,10 +4209,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -4210,8 +4223,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a Unsigned32 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, int:Signed8, additive-expr, record-type, - optional-type +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, int:Signed8, additive-expr, object-type, + record-type, optional-type function init() { int:Unsigned32 startIndex = 1; @@ -4220,10 +4233,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -4234,8 +4247,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a Unsigned32 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, int:Signed16, additive-expr, record-type, - optional-type +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, int:Signed16, additive-expr, object-type, + record-type, optional-type function init() { int:Unsigned32 startIndex = 1; @@ -4244,10 +4257,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -4258,8 +4271,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a Unsigned32 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, int:Signed32, additive-expr, record-type, - optional-type +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, int:Signed32, additive-expr, object-type, + record-type, optional-type function init() { int:Unsigned32 startIndex = 1; @@ -4268,10 +4281,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -4282,8 +4295,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a Unsigned32 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, int:Unsigned8, additive-expr, record-type, - optional-type +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, int:Unsigned8, additive-expr, object-type, + record-type, optional-type function init() { int:Unsigned32 startIndex = 1; @@ -4292,10 +4305,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -4307,7 +4320,7 @@ Test-Case: output Description: Test range expression with iterable object when value of the first expression is a Unsigned32 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, byte, additive-expr, record-type, +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, byte, additive-expr, object-type, record-type, optional-type function init() { @@ -4317,10 +4330,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -4331,8 +4344,8 @@ function init() { Test-Case: output Description: Test range expression with iterable object when value of the first expression is a Unsigned32 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, int:Unsigned16, additive-expr, record-type, - optional-type +Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, int:Unsigned16, additive-expr, object-type, + record-type, optional-type function init() { int:Unsigned32 startIndex = 1; @@ -4341,10 +4354,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -4356,7 +4369,7 @@ Test-Case: output Description: Test range expression with iterable object when values of expressions are of user-defined subtypes of int. Fail-Issue: ballerina-platform/ballerina-lang#33139 Labels: range-expr, iterable-object, int, DecimalNumber, singleton-type, union-type, module-type-decl, - additive-expr, record-type, optional-type + additive-expr, object-type, record-type, optional-type type Ints 1|10; @@ -4367,10 +4380,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -4382,7 +4395,7 @@ Test-Case: output Description: Test range expression with iterable object when values of expressions are of union of int subtypes. Fail-Issue: ballerina-platform/ballerina-lang#33139 Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Unsigned32, union-type, additive-expr, - record-type, optional-type + object-type, record-type, optional-type function init() { int:Signed8|int:Unsigned32 startIndex = 1; @@ -4391,10 +4404,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -4405,7 +4418,7 @@ function init() { Test-Case: output Description: Test range expression with iterable object when the value of the first expression and the value of the second expression is equal. -Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, record-type, optional-type +Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, object-type, record-type, optional-type function init() { int startIndex = 5; @@ -4414,10 +4427,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -4428,7 +4441,7 @@ function init() { Test-Case: output Description: Test range expression when the value of the first expression is less than the value of the second expression. -Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, record-type, optional-type +Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, object-type, record-type, optional-type function init() { int startIndex = 5; @@ -4437,10 +4450,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -4450,7 +4463,7 @@ function init() { Test-Case: output Description: Test range expression with iterable object when the types of the values of the expressions are inferred. -Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, record-type, optional-type, var +Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, object-type, record-type, optional-type, var function init() { var startIndex = 1; @@ -4459,10 +4472,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = startIndex...endIndex; + } range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -4480,7 +4493,7 @@ function init() { int endIndex = 10; int count = 0; - var range = startIndex...endIndex; + var range = startIndex ... endIndex; foreach int i in range { count = count + 1; @@ -4490,17 +4503,17 @@ function init() { Test-Case: output Description: Test range expression at module level. -Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, record-type, optional-type, var +Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, object-type, record-type, optional-type, var int startIndex = 1; int endIndex = 10; object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; -} range = startIndex...endIndex; +} range = startIndex ... endIndex; function init() { int count = 0; @@ -4518,7 +4531,7 @@ Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, var int startIndex = 1; int endIndex = 10; -var range = startIndex...endIndex; +var range = startIndex ... endIndex; function init() { int count = 0; @@ -4531,14 +4544,14 @@ function init() { Test-Case: output Description: Test iterable object returned by the range expression. -Labels: range-expr, int, DecimalNumber, object-type, optional-type, var, value:toBalString +Labels: range-expr, int, DecimalNumber, object-type, optional-type, var, value:toBalString, method-call-expr function init() { object { public isolated function iterator() returns (object { public isolated function next() returns (record {|int value;|}?); }); - } range = 1...3; + } range = 1 ... 3; var iterator = range.iterator(); @@ -4561,8 +4574,8 @@ function init() { Test-Case: output Description: Test field and member access as expressions in range expression. -Labels: range-expr, iterable-object, array-type, DecimalNumber, field-access-expr, int, list-constructor, - mapping-constructor, member-access-expr, module-type-defn, record-type, optional-type +Labels: range-expr, iterable-object, additive-expr, array-type, DecimalNumber, field-access-expr, int, list-constructor, + mapping-constructor, member-access-expr, module-type-defn, object-type, record-type, optional-type type Record record { int x; @@ -4575,10 +4588,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = c.x...d[0]; + } range = c.x ... d[0]; foreach int i in range { count = count + 1; @@ -4589,7 +4602,7 @@ function init() { Test-Case: output Description: Test function and method call as expressions in range expression. Labels: range-expr, iterable-object, DecimalNumber, int, explicit-new-expr, function-call-expr - module-class-defn, method-call-expr, record-type, optional-type + module-class-defn, method-call-expr, additive-expr, object-type, record-type, optional-type class Class { function getInt() returns int { @@ -4603,10 +4616,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = cls.getInt()...getInt(); + } range = cls.getInt() ... getInt(); foreach int i in range { count = count + 1; @@ -4620,17 +4633,18 @@ function getInt() returns int { Test-Case: output Description: Test type cast expression as expressions in range expression. -Labels: range-expr, iterable-object, DecimalNumber, int, type-cast-expr, record-type, optional-type +Labels: range-expr, iterable-object, DecimalNumber, int, type-cast-expr, additive-expr, object-type, record-type, + optional-type function init() { int count = 0; object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = 1.0...10.0; + } range = 1.0 ... 10.0; foreach int i in range { count = count + 1; @@ -4640,18 +4654,18 @@ function init() { Test-Case: output Description: Test unary expressions as expressions in range expression. -Labels: range-expr, iterable-object, DecimalNumber, int, unary-complement, unary-minus, unary-plus, - record-type, optional-type +Labels: range-expr, iterable-object, DecimalNumber, int, unary-complement, unary-minus, unary-plus, additive-expr, + object-type, record-type, optional-type function init() { int count = 0; object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = -10...+2; + } range = -10 ... +2; foreach int i in range { count = count + 1; @@ -4659,7 +4673,7 @@ function init() { io:println(count); // @output 13 count = 0; - range = -10...~2; + range = -10 ... ~2; foreach int i in range { count = count + 1; @@ -4669,17 +4683,17 @@ function init() { Test-Case: output Description: Test additive expression as expressions in range expression. -Labels: range-expr, iterable-object, additive-expr, int, DecimalNumber, record-type, optional-type +Labels: range-expr, iterable-object, additive-expr, int, DecimalNumber, object-type, record-type, optional-type function init() { int count = 0; object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = 0+1...12-2; + } range = 0+1 ... 12-2; foreach int i in range { count = count + 1; @@ -4689,17 +4703,18 @@ function init() { Test-Case: output Description: Test multiplicative expressions as expressions in range expression. -Labels: range-expr, iterable-object, DecimalNumber, int, multiplicative-expr, record-type, optional-type +Labels: range-expr, iterable-object, additive-expr, DecimalNumber, int, multiplicative-expr, object-type, record-type, + optional-type function init() { int count = 0; object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = 1*2...36/4; + } range = 1*2 ... 36/4; foreach int i in range { count = count + 1; @@ -4707,7 +4722,7 @@ function init() { io:println(count); // @output 8 count = 0; - range = 34%5...4*5; + range = 34%5 ... 4*5; foreach int i in range { count = count + 1; @@ -4717,17 +4732,18 @@ function init() { Test-Case: output Description: Test binary bitwise expressions as expressions in range expression. -Labels: range-expr, iterable-object, binary-bitwise-expr, DecimalNumber, int, record-type, optional-type +Labels: range-expr, iterable-object, binary-bitwise-expr, DecimalNumber, int, additive-expr, object-type, record-type, + optional-type function init() { int count = 0; object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = (1&2)...(4|8); + } range = (1&2) ... (4|8); foreach int i in range { count = count + 1; @@ -4735,7 +4751,7 @@ function init() { io:println(count); // @output 13 count = 0; - range = (6|3)...(2^8); + range = (6|3) ... (2^8); foreach int i in range { count = count + 1; @@ -4745,8 +4761,8 @@ function init() { Test-Case: output Description: Test checking expressions as expressions in range expression. -Labels: range-expr, iterable-object, check, checkpanic DecimalNumber, error, int, union-type, - record-type, optional-type +Labels: range-expr, iterable-object, check, checkpanic, DecimalNumber, error, int, union-type, additive-expr, + object-type, record-type, optional-type function init() returns error? { int|error startIndex = 2; @@ -4755,10 +4771,10 @@ function init() returns error? { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = check startIndex...checkpanic endIndex; + } range = check startIndex ... checkpanic endIndex; foreach int i in range { count = count + 1; @@ -4768,17 +4784,17 @@ function init() returns error? { Test-Case: output Description: Test let expression as expressions in range expression. -Labels: range-expr, iterable-object, DecimalNumber, int, let-expr, record-type, optional-type +Labels: range-expr, iterable-object, DecimalNumber, int, let-expr, additive-expr, object-type, record-type, optional-type function init() { int count = 0; object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = (let int h1 = 10 in h1)...(let int h1 = 25 in h1); + } range = (let int h1 = 10 in h1) ... (let int h1 = 25 in h1); foreach int i in range { count = count + 1; @@ -4788,17 +4804,18 @@ function init() { Test-Case: output Description: Test shift expressions as expressions in range expression. -Labels: range-expr, iterable-object, DecimalNumber, int, shift-expr, record-type, optional-type +Labels: range-expr, iterable-object, DecimalNumber, int, shift-expr, additive-expr, object-type, record-type, + optional-type function init() { int count = 0; object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = 1<<2...100>>4; + } range = 1<<2 ... 100>>4; foreach int i in range { count = count + 1; @@ -4808,8 +4825,8 @@ function init() { Test-Case: output Description: Test conditional expressions as expressions in range expression. -Labels: range-expr, iterable-object, conditional-expr, DecimalNumber, error, int, nil-literal, - optional-type, union-type, record-type +Labels: range-expr, iterable-object, conditional-expr, additive-expr, DecimalNumber, error, int, nil-literal, + optional-type, union-type, object-type, record-type function init() { int|error a = 10; @@ -4818,10 +4835,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = (a is error ? 5 : a)...(b ?: 25); + } range = (a is error ? 5 : a) ... (b ?: 25); foreach int i in range { count = count + 1; @@ -4829,10 +4846,9 @@ function init() { io:println(count); // @output 16 } - Test-Case: output Description: Test lang.int constants as expressions in range expression. -Labels: range-expr, iterable-object, int, int:SIGNED8_MAX_VALUE, int:UNSIGNED8_MAX_VALUE, +Labels: range-expr, iterable-object, int, int:SIGNED8_MAX_VALUE, int:UNSIGNED8_MAX_VALUE, additive-expr, object-type, record-type, optional-type function init() { @@ -4840,10 +4856,10 @@ function init() { object { *object:Iterable; - public function iterator() returns object { + public isolated function iterator() returns object { public isolated function next() returns (record {|int value;|}?); }; - } range = int:SIGNED8_MAX_VALUE...int:UNSIGNED8_MAX_VALUE; + } range = int:SIGNED8_MAX_VALUE ... int:UNSIGNED8_MAX_VALUE; foreach int i in range { count = count + 1; @@ -4853,26 +4869,70 @@ function init() { Test-Case: output Description: Test isolatedness of range expression. -Fail-Issue: ballerina-platform/ballerina-lang#33139 not isolated? prints false -Labels: range-expr, iterable-object, object-type, record-type, optional-type +Fail-Issue: ballerina-platform/ballerina-lang#33163 +Labels: range-expr, iterable-object, object-type, additive-expr, int, DecimalNumber, function-call-expr, record-type, + optional-type, lock-stmt + +isolated int i = 1; + +function init() { + int count = 0; + foreach int i in getRange() { + count = count + 1; + } + io:println(count); // @output 10 +} + +function getRange() returns object { + *object:Iterable; + public isolated function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; +} { + lock { + return i ... i + 9; + } +} + +Test-Case: output +Description: Test isolatedness of range expression. +Fail-Issue: ballerina-platform/ballerina-lang#33163 +Labels: range-expr, object-type, record-type, int, optional-type, is-expr, any, type-cast-expr function init() { object { *object:Iterable; - public function iterator() returns object { - public function next() returns (record {|int value;|}?); + public isolated function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); }; - } range = 1...10; + } range = 1 ... 10; io:println(range is isolated object {}); // @output true } +Test-Case: output +Description: Test isolatedness of range expression. +Fail-Issue: ballerina-platform/ballerina-lang#33163 +Labels: range-expr, object-type, int, DecimalNumber, record-type, optional-type, is-expr, method-call-expr + +function init() { + object { + public isolated function iterator() returns (object { + public isolated function next() returns (record {|int value;|}?); + }); + } range = 1 ... 10; + + + io:println(range.iterator() is isolated function); // @output true + io:println(range.iterator().next() is isolated function); // @output true +} + Test-Case: output Description: Test range expression with query expression. -Labels: range-expr, array-type, int, DecimalNumber, query-expr +Labels: range-expr, iterable-inclusive, array-type, int, DecimalNumber, query-expr function init() { - int[] a = from int i in 1...10 + int[] a = from int i in 1 ... 10 select i; io:println(a); // @output [1,2,3,4,5,6,7,8,9,10] @@ -4883,18 +4943,18 @@ Description: Test range expression when static type of either of the expression Labels: range-expr, int, DecimalFloatingPointNumber, string function init() { - _ = 1.0 ... 10; // @error ... not defined as static type of first expression is not a subtype of int - _ = 1 ... 10.0; // @error ... not defined as static type of second expression is not a subtype of int - _ = 1.0 ... 10.0; // @error ... not defined as static type of both expressions are not subtypes of int + _ = 1.0 ... 10; // @error ... not defined when static type of either of the expression is not a subtype of int + _ = 1 ... 10.0; // @error ... not defined when static type of either of the expression is not a subtype of int + _ = 1.0 ... 10.0; // @error ... not defined when static type of either of the expression is not a subtype of int - _ = "1" ... 10; // @error ... not defined as static type of first expression is not a subtype of int - _ = 1 ... "10"; // @error ... not defined as static type of second expression is not a subtype of int - _ = "1" ... "10"; // @error ... not defined as static type of both expressions are not subtypes of int + _ = "1" ... 10; // @error ... not defined when static type of either of the expression is not a subtype of int + _ = 1 ... "10"; // @error ... not defined when static type of either of the expression is not a subtype of int + _ = "1" ... "10"; // @error ... not defined when static type of either of the expression is not a subtype of int } Test-Case: error Description: Test assigning the result of range expression to an incompatible type. -Labels: range-expr, int, DecimalNumber, object-type +Labels: range-expr, int, DecimalNumber, object-type, record-type, optional-type function init() { int _ = 1 ... 10; // @error result of a range expression is an object @@ -4909,7 +4969,7 @@ function init() { Test-Case: error Description: Test assigning the result of range expression to an incompatible type when the static type of the range expression is inferred. -Labels: range-expr, int, DecimalNumber, object-type, var, record-type, optional-type +Labels: range-expr, int, DecimalNumber, object-type, var, record-type, float, optional-type function init() { var a = 1 ... 10; @@ -4922,3 +4982,13 @@ function init() { }); } _ = a; // @error next() of range expression's iterable object returns a record {|int value;|} } + +Test-Case: parser-error +Description: Test range expression syntax errors +Labels: range-expr, DecimalNumber + +function init() { + _ = 1..10; // @error invalid operation + // @error missing binary operator + // @error missing identifier +} From 782f363ef0a8760e8378d1f8dd38b3c170dda182 Mon Sep 17 00:00:00 2001 From: lasinicl Date: Sun, 17 Oct 2021 01:00:48 +0530 Subject: [PATCH 03/14] Fix descriptions --- .../range-expr/range_expr_exclusive.balt | 560 ++++++++------- .../range-expr/range_expr_inclusive.balt | 666 +++++++++--------- 2 files changed, 635 insertions(+), 591 deletions(-) diff --git a/conformance/lang/expressions/range-expr/range_expr_exclusive.balt b/conformance/lang/expressions/range-expr/range_expr_exclusive.balt index 4f855e09..ff401f26 100644 --- a/conformance/lang/expressions/range-expr/range_expr_exclusive.balt +++ b/conformance/lang/expressions/range-expr/range_expr_exclusive.balt @@ -1,5 +1,5 @@ Test-Case: output -Description: Test range expression when values of expressions are positive integers +Description: Test range expression (exclusive) when values of both expressions are positive integers. Labels: range-expr, iterable-exclusive, int, DecimalNumber, additive-expr function init() { @@ -13,7 +13,7 @@ function init() { } Test-Case: output -Description: Test range expression when values of expressions are negative integers +Description: Test range expression (exclusive) when values of both expressions are negative integers. Labels: range-expr, iterable-exclusive, int, DecimalNumber, unary-minus, additive-expr function init() { @@ -27,7 +27,8 @@ function init() { } Test-Case: output -Description: Test range expression when values of expressions are integers +Description: Test range expression (exclusive) when the value of one expression is a negative integer and the value of the other + expression is a positive integer. Labels: range-expr, iterable-exclusive, int, DecimalNumber, unary-minus, additive-expr function init() { @@ -41,7 +42,8 @@ function init() { } Test-Case: output -Description: Test range expression when values of both expressions are integers +Description: Test range expression (exclusive) when the value of one expression is a negative integer and the value of the other + expression is a positive integer. Labels: range-expr, iterable-exclusive, int, DecimalNumber, unary-minus, additive-expr function init() { @@ -55,7 +57,7 @@ function init() { } Test-Case: output -Description: Test range expression when values of expressions are positive Signed8 integers +Description: Test range expression (exclusive) when values of both expressions are positive Signed8 integers. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, additive-expr function init() { @@ -69,7 +71,7 @@ function init() { } Test-Case: output -Description: Test range expression when values of expressions are negative Signed8 integers +Description: Test range expression (exclusive) when values of both expressions are negative Signed8 integers. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, unary-minus, additive-expr function init() { @@ -83,7 +85,8 @@ function init() { } Test-Case: output -Description: Test range expression when values of expressions are Signed8 integers +Description: Test range expression (exclusive) when the value of one expression is a negative Signed8 integer and + the value of the other expression is a positive Signed8 integer. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, unary-minus, additive-expr function init() { @@ -97,7 +100,7 @@ function init() { } Test-Case: output -Description: Test range expression when values of expressions are positive Signed16 integers +Description: Test range expression (exclusive) when values of both expressions are positive Signed16 integers. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, additive-expr function init() { @@ -111,7 +114,7 @@ function init() { } Test-Case: output -Description: Test range expression when values of expressions are negative Signed16 integers +Description: Test range expression (exclusive) when values of both expressions are negative Signed16 integers. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, unary-minus, additive-expr function init() { @@ -125,7 +128,8 @@ function init() { } Test-Case: output -Description: Test range expression when values of expressions are Signed16 integers +Description: Test range expression (exclusive) when the value of one expression is a negative Signed16 integer and + the value of the other expression is a positive Signed16 integer. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, unary-minus, additive-expr function init() { @@ -139,7 +143,7 @@ function init() { } Test-Case: output -Description: Test range expression when values of expressions are positive Signed32 integers +Description: Test range expression (exclusive) when values of both expressions are positive Signed32 integers. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, additive-expr function init() { @@ -153,7 +157,7 @@ function init() { } Test-Case: output -Description: Test range expression when values of expressions are negative Signed32 integers +Description: Test range expression (exclusive) when values of both expressions are negative Signed32 integers. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, unary-minus, additive-expr function init() { @@ -167,7 +171,8 @@ function init() { } Test-Case: output -Description: Test range expression when values of expressions are Signed32 integers +Description: Test range expression (exclusive) when the value of one expression is a negative Signed32 integer and + the value of the other expression is a positive Signed32 integer. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, unary-minus, additive-expr function init() { @@ -181,7 +186,7 @@ function init() { } Test-Case: output -Description: Test range expression when values of expressions are Unsigned8 integers +Description: Test range expression (exclusive) when values of both expressions are Unsigned8 integers. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned8, additive-expr function init() { @@ -195,7 +200,7 @@ function init() { } Test-Case: output -Description: Test range expression when values of expressions are Unsigned16 integers +Description: Test range expression (exclusive) when values of both expressions are Unsigned16 integers. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned16, additive-expr function init() { @@ -209,7 +214,7 @@ function init() { } Test-Case: output -Description: Test range expression when values of expressions are Unsigned32 integers +Description: Test range expression (exclusive) when values of both expressions are Unsigned32 integers. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned32, additive-expr function init() { @@ -223,7 +228,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a positive integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a positive integer and value of the second expression is a positive Signed8 integer. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, additive-expr @@ -238,7 +243,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a negative integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a negative integer and value of the second expression is a negative Signed8 integer. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, unary-minus, additive-expr @@ -253,7 +258,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a negative integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a negative integer and value of the second expression is a positive Signed8 integer. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, unary-minus, additive-expr @@ -268,7 +273,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a positive integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a positive integer and value of the second expression is a positive Signed16 integer. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, additive-expr @@ -283,7 +288,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a negative integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a negative integer and value of the second expression is a negative Signed16 integer. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, unary-minus, additive-expr @@ -298,7 +303,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a negative integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a negative integer and value of the second expression is a positive Signed16 integer. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, unary-minus, additive-expr @@ -313,7 +318,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a positive integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a positive integer and value of the second expression is a positive Signed32 integer. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, additive-expr @@ -328,7 +333,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a negative integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a negative integer and value of the second expression is a negative Signed32 integer. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, unary-minus, additive-expr @@ -343,7 +348,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a negative integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a negative integer and value of the second expression is a positive Signed32 integer. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, unary-minus, additive-expr @@ -358,7 +363,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a positive integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a positive integer and value of the second expression is a Unsigned8 integer. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned8, additive-expr @@ -373,7 +378,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a negative integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a negative integer and value of the second expression is a Unsigned8 integer. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned8, unary-minus, additive-expr @@ -388,7 +393,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a positive integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a positive integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 Labels: range-expr, iterable-exclusive, int, DecimalNumber, byte, additive-expr @@ -404,7 +409,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a negative integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a negative integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 Labels: range-expr, iterable-exclusive, int, DecimalNumber, byte, unary-minus, additive-expr @@ -420,7 +425,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a positive integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a positive integer and value of the second expression is a Unsigned16 integer. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned16, additive-expr @@ -435,7 +440,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a negative integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a negative integer and value of the second expression is a Unsigned16 integer. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned16, unary-minus, additive-expr @@ -450,7 +455,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a positive integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a positive integer and value of the second expression is a Unsigned32 integer. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned32, additive-expr @@ -465,7 +470,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a negative integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a negative integer and value of the second expression is a Unsigned32 integer. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned32, unary-minus, additive-expr @@ -480,7 +485,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a positive Signed8 integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a positive Signed8 integer and value of the second expression is a positive integer. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, additive-expr @@ -495,7 +500,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a negative Signed8 integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a negative integer. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, unary-minus, additive-expr @@ -510,7 +515,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a negative Signed8 integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a positive integer. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, unary-minus, additive-expr @@ -525,7 +530,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a positive Signed8 integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a positive Signed8 integer and value of the second expression is a positive Signed16 integer. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Signed16, additive-expr @@ -540,7 +545,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a negative Signed8 integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a negative Signed16 integer. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Signed16, unary-minus, additive-expr @@ -555,7 +560,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a negative Signed8 integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a positive Signed16 integer. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Signed16, unary-minus, additive-expr @@ -570,7 +575,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a positive Signed8 integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a positive Signed8 integer and value of the second expression is a positive Signed32 integer. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Signed32, additive-expr @@ -585,7 +590,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a negative Signed8 integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a negative Signed32 integer. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Signed32, unary-minus, additive-expr @@ -600,7 +605,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a negative Signed8 integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a positive Signed32 integer. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Signed32, unary-minus, additive-expr @@ -615,7 +620,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a positive Signed8 integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a positive Signed8 integer and value of the second expression is a Unsigned8 integer. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Unsigned8, additive-expr @@ -630,7 +635,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a negative Signed8 integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a Unsigned8 integer. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Unsigned8, unary-minus, additive-expr @@ -645,7 +650,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a positive Signed8 integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a positive Signed8 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, byte, additive-expr @@ -661,7 +666,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a negative Signed8 integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, byte, unary-minus, additive-expr @@ -677,7 +682,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a positive Signed8 integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a positive Signed8 integer and value of the second expression is a Unsigned16 integer. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Unsigned16, additive-expr @@ -692,7 +697,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a negative Signed8 integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a Unsigned16 integer. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Unsigned16, unary-minus, additive-expr @@ -707,7 +712,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a positive Signed8 integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a positive Signed8 integer and value of the second expression is a Unsigned32 integer. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Unsigned32, additive-expr @@ -722,7 +727,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a negative Signed8 integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a Unsigned32 integer. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Unsigned32, unary-minus, additive-expr @@ -737,7 +742,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a positive Signed16 integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a positive Signed16 integer and value of the second expression is a positive integer. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, additive-expr @@ -752,7 +757,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a negative Signed16 integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a negative integer. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, unary-minus, additive-expr @@ -767,7 +772,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a negative Signed16 integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a positive integer. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, unary-minus, additive-expr @@ -782,7 +787,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a positive Signed16 integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a positive Signed16 integer and value of the second expression is a positive Signed8 integer. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Signed16, additive-expr @@ -797,7 +802,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a negative Signed16 integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a negative Signed8 integer. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Signed16, unary-minus, additive-expr @@ -812,7 +817,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a negative Signed16 integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a positive Signed8 integer. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Signed16, unary-minus, additive-expr @@ -827,7 +832,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a positive Signed16 integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a positive Signed16 integer and value of the second expression is a positive Signed32 integer. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, int:Signed32, additive-expr @@ -842,7 +847,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a negative Signed16 integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a negative Signed32 integer. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, int:Signed32, unary-minus, additive-expr @@ -857,7 +862,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a negative Signed16 integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a positive Signed32 integer. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, int:Signed32, unary-minus, additive-expr @@ -872,7 +877,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a positive Signed16 integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a positive Signed16 integer and value of the second expression is a Unsigned8 integer. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, int:Unsigned8, additive-expr @@ -887,7 +892,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a negative Signed16 integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a Unsigned8 integer. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, int:Unsigned8, unary-minus, additive-expr @@ -902,7 +907,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a positive Signed16 integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a positive Signed16 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, byte, additive-expr @@ -918,7 +923,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a negative Signed16 integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, byte, unary-minus, additive-expr @@ -934,7 +939,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a positive Signed16 integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a positive Signed16 integer and value of the second expression is a Unsigned16 integer. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, int:Unsigned16, additive-expr @@ -949,7 +954,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a negative Signed16 integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a Unsigned16 integer. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, int:Unsigned16, unary-minus, additive-expr @@ -964,7 +969,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a positive Signed16 integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a positive Signed16 integer and value of the second expression is a Unsigned32 integer. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, int:Unsigned32, additive-expr @@ -979,7 +984,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a negative Signed16 integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a Unsigned32 integer. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, int:Unsigned32, unary-minus, additive-expr @@ -994,7 +999,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a positive Signed32 integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a positive Signed32 integer and value of the second expression is a positive integer. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, additive-expr @@ -1009,7 +1014,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a negative Signed32 integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a negative integer. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, unary-minus, additive-expr @@ -1024,7 +1029,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a negative Signed32 integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a positive integer. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, unary-minus, additive-expr @@ -1039,7 +1044,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a positive Signed32 integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a positive Signed32 integer and value of the second expression is a positive Signed8 integer. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Signed32, additive-expr @@ -1054,7 +1059,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a negative Signed32 integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a negative Signed8 integer. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Signed32, unary-minus, additive-expr @@ -1069,7 +1074,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a negative Signed32 integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a positive Signed8 integer. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Signed32, unary-minus, additive-expr @@ -1084,7 +1089,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a positive Signed32 integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a positive Signed32 integer and value of the second expression is a positive Signed16 integer. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, int:Signed32, additive-expr @@ -1099,7 +1104,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a negative Signed32 integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a negative Signed16 integer. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, int:Signed32, unary-minus, additive-expr @@ -1114,7 +1119,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a negative Signed32 integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a positive Signed16 integer. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, int:Signed32, unary-minus, additive-expr @@ -1129,7 +1134,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a positive Signed32 integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a positive Signed32 integer and value of the second expression is a Unsigned8 integer. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, int:Unsigned8, additive-expr @@ -1144,7 +1149,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a negative Signed32 integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a Unsigned8 integer. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, int:Unsigned8, unary-minus, additive-expr @@ -1159,7 +1164,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a positive Signed32 integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a positive Signed32 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, byte, additive-expr @@ -1175,7 +1180,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a negative Signed32 integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, byte, unary-minus, additive-expr @@ -1191,7 +1196,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a positive Signed32 integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a positive Signed32 integer and value of the second expression is a Unsigned16 integer. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, int:Unsigned16, additive-expr @@ -1206,7 +1211,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a negative Signed32 integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a Unsigned16 integer. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, int:Unsigned16, unary-minus, additive-expr @@ -1221,7 +1226,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a positive Signed32 integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a positive Signed32 integer and value of the second expression is a Unsigned32 integer. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, int:Unsigned32, additive-expr @@ -1236,7 +1241,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a negative Signed32 integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a Unsigned32 integer. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, int:Unsigned32, unary-minus, additive-expr @@ -1251,7 +1256,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a Unsigned8 integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a Unsigned8 integer and value of the second expression is a positive integer. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned8, additive-expr @@ -1266,7 +1271,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a Unsigned8 integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a Unsigned8 integer and value of the second expression is a positive Signed8 integer. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Unsigned8, additive-expr @@ -1281,7 +1286,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a Unsigned8 integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a Unsigned8 integer and value of the second expression is a positive Signed16 integer. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, int:Unsigned8, additive-expr @@ -1296,7 +1301,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a Unsigned8 integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a Unsigned8 integer and value of the second expression is a positive Signed32 integer. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, int:Unsigned8, additive-expr @@ -1311,7 +1316,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a Unsigned8 integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a Unsigned8 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned8, byte, additive-expr @@ -1327,7 +1332,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a Unsigned8 integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a Unsigned8 integer and value of the second expression is a Unsigned16 integer. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned8, int:Unsigned16, additive-expr @@ -1342,7 +1347,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a Unsigned8 integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a Unsigned8 integer and value of the second expression is a Unsigned32 integer. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned8, int:Unsigned32, additive-expr @@ -1357,7 +1362,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a Unsigned16 integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a Unsigned16 integer and value of the second expression is a positive integer. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned16, additive-expr @@ -1372,7 +1377,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a Unsigned16 integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a Unsigned16 integer and value of the second expression is a positive Signed8 integer. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Unsigned16, additive-expr @@ -1387,7 +1392,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a Unsigned16 integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a Unsigned16 integer and value of the second expression is a positive Signed16 integer. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, int:Unsigned16, additive-expr @@ -1402,7 +1407,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a Unsigned16 integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a Unsigned16 integer and value of the second expression is a positive Signed32 integer. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, int:Unsigned16, additive-expr @@ -1417,7 +1422,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a Unsigned16 integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a Unsigned16 integer and value of the second expression is a Unsigned8 integer. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned8, int:Unsigned16, additive-expr @@ -1432,7 +1437,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a Unsigned16 integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a Unsigned16 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned16, byte, additive-expr @@ -1448,7 +1453,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a Unsigned16 integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a Unsigned16 integer and value of the second expression is a Unsigned32 integer. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned16, int:Unsigned32, additive-expr @@ -1463,7 +1468,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a Unsigned32 integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a Unsigned32 integer and value of the second expression is a positive integer. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned32, additive-expr @@ -1478,7 +1483,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a Unsigned32 integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a Unsigned32 integer and value of the second expression is a positive Signed8 integer. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Unsigned32, additive-expr @@ -1493,7 +1498,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a Unsigned32 integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a Unsigned32 integer and value of the second expression is a positive Signed16 integer. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, int:Unsigned32, additive-expr @@ -1508,7 +1513,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a Unsigned32 integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a Unsigned32 integer and value of the second expression is a positive Signed32 integer. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, int:Unsigned32, additive-expr @@ -1523,7 +1528,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a Unsigned32 integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a Unsigned32 integer and value of the second expression is a Unsigned8 integer. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned8, int:Unsigned32, additive-expr @@ -1538,7 +1543,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a Unsigned32 integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a Unsigned32 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned32, byte, additive-expr @@ -1554,7 +1559,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a Unsigned32 integer and value of the +Description: Test range expression (exclusive) when value of the first expression is a Unsigned32 integer and value of the second expression is a Unsigned16 integer. Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned16, int:Unsigned32, additive-expr @@ -1569,7 +1574,7 @@ function init() { } Test-Case: output -Description: Test range expression when values of expressions are of user-defined subtypes of int. +Description: Test range expression (exclusive) when values of both expressions are of user-defined subtypes of int. Fail-Issue: ballerina-platform/ballerina-lang#33139 Labels: range-expr, iterable-exclusive, int, DecimalNumber, singleton-type, union-type, module-type-decl, additive-expr @@ -1587,7 +1592,7 @@ function init() { } Test-Case: output -Description: Test range expression when values of expressions are of union of int subtypes. +Description: Test range expression (exclusive) when values of both expressions are of union of int subtypes. Fail-Issue: ballerina-platform/ballerina-lang#33139 Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Unsigned32, union-type, additive-expr @@ -1602,7 +1607,7 @@ function init() { } Test-Case: output -Description: Test range expression when the value of the first expression and the value of the second expression +Description: Test range expression (exclusive) when the value of the first expression and the value of the second expression is equal. Labels: range-expr, iterable-exclusive, int, DecimalNumber, additive-expr @@ -1618,7 +1623,7 @@ function init() { } Test-Case: output -Description: Test range expression when the value of the first expression is less than the +Description: Test range expression (exclusive) when the value of the first expression is less than the value of the second expression. Labels: range-expr, iterable-exclusive, int, DecimalNumber, additive-expr @@ -1634,7 +1639,7 @@ function init() { } Test-Case: output -Description: Test range expression when the types expressions are inferred. +Description: Test range expression (exclusive) when the types expressions are inferred. Labels: range-expr, iterable-exclusive, int, DecimalNumber, additive-expr, var function init() { @@ -1649,7 +1654,7 @@ function init() { } Test-Case: output -Description: Test field and member access as expressions in range expression. +Description: Test field and member access as expressions in range expression (exclusive). Labels: range-expr, iterable-exclusive, array-type, DecimalNumber, field-access-expr, int, list-constructor, mapping-constructor, member-access-expr, module-type-defn, record-type @@ -1669,7 +1674,7 @@ function init() { } Test-Case: output -Description: Test function and method call as expressions in range expression. +Description: Test function and method call as expressions in range expression (exclusive). Labels: range-expr, iterable-exclusive, DecimalNumber, int, explicit-new-expr, function-call-expr module-class-defn, method-call-expr @@ -1694,7 +1699,7 @@ function getInt() returns int { } Test-Case: output -Description: Test type cast expression as expressions in range expression. +Description: Test type cast expression as expressions in range expression (exclusive). Labels: range-expr, iterable-exclusive, DecimalNumber, int, type-cast-expr function init() { @@ -1707,7 +1712,7 @@ function init() { } Test-Case: output -Description: Test unary expressions as expressions in range expression. +Description: Test unary expressions as expressions in range expression (exclusive). Labels: range-expr, iterable-exclusive, DecimalNumber, int, unary-complement, unary-minus, unary-plus function init() { @@ -1726,7 +1731,7 @@ function init() { } Test-Case: output -Description: Test additive expression as expressions in range expression. +Description: Test additive expression as expressions in range expression (exclusive). Labels: range-expr, iterable-exclusive, additive-expr, int, DecimalNumber function init() { @@ -1739,7 +1744,7 @@ function init() { } Test-Case: output -Description: Test multiplicative expressions as expressions in range expression. +Description: Test multiplicative expressions as expressions in range expression (exclusive). Labels: range-expr, iterable-exclusive, DecimalNumber, int, multiplicative-expr function init() { @@ -1758,7 +1763,7 @@ function init() { } Test-Case: output -Description: Test binary bitwise expressions as expressions in range expression. +Description: Test binary bitwise expressions as expressions in range expression (exclusive). Labels: range-expr, iterable-exclusive, binary-bitwise-expr, DecimalNumber, int function init() { @@ -1777,7 +1782,7 @@ function init() { } Test-Case: output -Description: Test checking expressions as expressions in range expression. +Description: Test checking expressions as expressions in range expression (exclusive). Labels: range-expr, iterable-exclusive, check, checkpanic, DecimalNumber, error, int, union-type, optional-type function init() returns error? { @@ -1792,7 +1797,7 @@ function init() returns error? { } Test-Case: output -Description: Test let expression as expressions in range expression. +Description: Test let expression as expressions in range expression (exclusive). Labels: range-expr, iterable-exclusive, let-expr, DecimalNumber, int function init() { @@ -1805,7 +1810,7 @@ function init() { } Test-Case: output -Description: Test shift expressions as expressions in range expression. +Description: Test shift expressions as expressions in range expression (exclusive). Labels: range-expr, iterable-exclusive, shift-expr, DecimalNumber, int function init() { @@ -1818,7 +1823,7 @@ function init() { } Test-Case: output -Description: Test conditional expressions as expressions in range expression. +Description: Test conditional expressions as expressions in range expression (exclusive). Labels: range-expr, iterable-exclusive, conditional-expr, DecimalNumber, error, int, nil-literal, optional-type, union-type @@ -1834,7 +1839,7 @@ function init() { } Test-Case: output -Description: Test lang.int constants as expressions in range expression. +Description: Test lang.int constants as expressions in range expression (exclusive). Labels: range-expr, iterable-exclusive, int, int:SIGNED8_MAX_VALUE, int:UNSIGNED8_MAX_VALUE function init() { @@ -1847,7 +1852,8 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when values of expressions are positive integers +Description: Test range expression (exclusive) with iterable object when values of both expressions are positive + integers. Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, object-type, record-type, optional-type function init() { @@ -1869,7 +1875,8 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when values of expressions are negative integers +Description: Test range expression (exclusive) with iterable object when values of both expressions are negative + integers. Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, object-type, record-type, optional-type, unary-minus @@ -1892,7 +1899,8 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when values of expressions are integers +Description: Test range expression (exclusive) with iterable object when the value of one expression is a + negative integer and the value of the other expression is a positive integer. Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, object-type, record-type, optional-type, unary-minus @@ -1915,7 +1923,8 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when values of both expressions are integers +Description: Test range expression (exclusive) with iterable object when the value of one expression is a negative + integer and the value of the other expression is a positive integer. Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, object-type, record-type, optional-type, unary-minus @@ -1938,7 +1947,8 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when values of expressions are positive Signed8 integers +Description: Test range expression (exclusive) with iterable object when values of both expressions are positive + Signed8 integers. Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, int:Signed8, additive-expr, object-type, record-type, optional-type @@ -1961,7 +1971,8 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when values of expressions are negative Signed8 integers +Description: Test range expression (exclusive) with iterable object when values of both expressions are negative + Signed8 integers. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus @@ -1984,7 +1995,8 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when values of expressions are Signed8 integers +Description: Test range expression (exclusive) with iterable object when the value of one expression is a negative + Signed8 integer and the value of the other expression is a positive Signed8 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus @@ -2007,7 +2019,8 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when values of expressions are positive Signed16 integers +Description: Test range expression (exclusive) with iterable object when values of both expressions are positive + Signed16 integers. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, object-type, record-type, optional-type @@ -2030,7 +2043,8 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when values of expressions are negative Signed16 integers +Description: Test range expression (exclusive) with iterable object when values of both expressions are negative + Signed16 integers. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus @@ -2053,7 +2067,8 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when values of expressions are Signed16 integers +Description: Test range expression (exclusive) with iterable object when the value of one expression is a + negative Signed16 integer and the value of the other expression is a positive Signed16 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus @@ -2076,7 +2091,8 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when values of expressions are positive Signed32 integers +Description: Test range expression (exclusive) with iterable object when values of both expressions are positive + Signed32 integers. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, object-type, record-type, optional-type @@ -2099,7 +2115,8 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when values of expressions are negative Signed32 integers +Description: Test range expression (exclusive) with iterable object when values of both expressions are negative + Signed32 integers. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus @@ -2122,7 +2139,8 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when values of expressions are Signed32 integers +Description: Test range expression (exclusive) with iterable object when the value of one expression is a + negative Signed32 integer and the value of the other expression is a positive Signed32 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus @@ -2145,7 +2163,8 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when values of expressions are Unsigned8 integers +Description: Test range expression (exclusive) with iterable object when values of both expressions are + Unsigned8 integers. Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, additive-expr, object-type, record-type, optional-type @@ -2168,7 +2187,8 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when values of expressions are Unsigned16 integers +Description: Test range expression (exclusive) with iterable object when values of both expressions are + Unsigned16 integers. Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, additive-expr, object-type, record-type, optional-type, unary-minus @@ -2191,7 +2211,8 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when values of expressions are Unsigned32 integers +Description: Test range expression (exclusive) with iterable object when values of both expressions are + Unsigned32 integers. Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, additive-expr, object-type, record-type, optional-type, unary-minus @@ -2214,8 +2235,8 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a positive integer - and value of the second expression is a positive Signed8 integer. +Description: Test range expression (exclusive) with iterable object when value of the first expression is a + positive integer and value of the second expression is a positive Signed8 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, additive-expr, object-type, record-type, optional-type @@ -2238,8 +2259,8 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a negative integer - and value of the second expression is a negative Signed8 integer. +Description: Test range expression (exclusive) with iterable object when value of the first expression is a + negative integer and value of the second expression is a negative Signed8 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus @@ -2262,8 +2283,8 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a negative integer - and value of the second expression is a positive Signed8 integer. +Description: Test range expression (exclusive) with iterable object when value of the first expression is a + negative integer and value of the second expression is a positive Signed8 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus @@ -2286,8 +2307,8 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a positive integer and value of the - second expression is a positive Signed16 integer. +Description: Test range expression (exclusive) with iterable object when value of the first expression is a + positive integer and value of the second expression is a positive Signed16 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, object-type, record-type, optional-type @@ -2310,8 +2331,8 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a negative integer and value of the - second expression is a negative Signed16 integer. +Description: Test range expression (exclusive) with iterable object when value of the first expression is a + negative integer and value of the second expression is a negative Signed16 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus @@ -2334,8 +2355,8 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a negative integer and value of the - second expression is a positive Signed16 integer. +Description: Test range expression (exclusive) with iterable object when value of the first expression is a + negative integer and value of the second expression is a positive Signed16 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus @@ -2358,8 +2379,8 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a positive integer - and value of the second expression is a positive Signed32 integer. +Description: Test range expression (exclusive) with iterable object when value of the first expression is a + positive integer and value of the second expression is a positive Signed32 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, object-type, record-type, optional-type @@ -2382,8 +2403,8 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a negative integer - and value of the second expression is a negative Signed32 integer. +Description: Test range expression (exclusive) with iterable object when value of the first expression is a + negative integer and value of the second expression is a negative Signed32 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus @@ -2406,8 +2427,8 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a negative integer and value of the - second expression is a positive Signed32 integer. +Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative + integer and value of the second expression is a positive Signed32 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus @@ -2430,8 +2451,8 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a positive integer and value of the - second expression is a Unsigned8 integer. +Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive + integer and value of the second expression is a Unsigned8 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, additive-expr, object-type, record-type, optional-type @@ -2454,8 +2475,8 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a negative integer and value of the - second expression is a Unsigned8 integer. +Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative + integer and value of the second expression is a Unsigned8 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, additive-expr, object-type, record-type, optional-type, unary-minus @@ -2478,8 +2499,8 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a positive integer and value of the - second expression is a byte. +Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive + integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 Labels: range-expr, iterable-object, int, DecimalNumber, byte, additive-expr, object-type, record-type, optional-type @@ -2502,7 +2523,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a negative integer +Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 Labels: range-expr, iterable-object, int, DecimalNumber, byte, additive-expr, object-type, record-type, optional-type, @@ -2527,7 +2548,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a positive integer +Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive integer and value of the second expression is a Unsigned16 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, additive-expr, object-type, record-type, optional-type @@ -2551,7 +2572,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a negative integer +Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative integer and value of the second expression is a Unsigned16 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, additive-expr, object-type, record-type, optional-type, unary-minus @@ -2575,7 +2596,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a positive integer +Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive integer and value of the second expression is a Unsigned32 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, additive-expr, object-type, record-type, optional-type @@ -2599,7 +2620,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a negative integer +Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative integer and value of the second expression is a Unsigned32 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, additive-expr, object-type, record-type, optional-type, unary-minus @@ -2623,7 +2644,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a positive Signed8 +Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed8 integer and value of the second expression is a positive integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, additive-expr, object-type, record-type, optional-type @@ -2647,7 +2668,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a negative Signed8 +Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a negative integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus @@ -2671,7 +2692,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a negative Signed8 +Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a positive integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus @@ -2695,7 +2716,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a positive Signed8 +Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed8 integer and value of the second expression is a positive Signed16 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Signed16, additive-expr, object-type, record-type, optional-type @@ -2719,7 +2740,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a negative Signed8 +Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a negative Signed16 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus @@ -2743,7 +2764,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a negative Signed8 +Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a positive Signed16 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus @@ -2767,7 +2788,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a positive Signed8 +Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed8 integer and value of the second expression is a positive Signed32 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Signed32, additive-expr, object-type, record-type, optional-type @@ -2792,7 +2813,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a negative Signed8 +Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a negative Signed32 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus @@ -2816,7 +2837,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a negative Signed8 +Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a positive Signed32 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus @@ -2840,7 +2861,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a positive Signed8 +Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed8 integer and value of the second expression is a Unsigned8 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Unsigned8, additive-expr, object-type, record-type, optional-type @@ -2865,7 +2886,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a negative Signed8 +Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a Unsigned8 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Unsigned8, additive-expr, object-type, record-type, optional-type, unary-minus @@ -2889,7 +2910,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a positive Signed8 integer +Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed8 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, byte, additive-expr, object-type, record-type, @@ -2914,7 +2935,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a negative Signed8 +Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, byte, additive-expr, object-type, record-type, @@ -2939,7 +2960,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a positive Signed8 +Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed8 integer and value of the second expression is a Unsigned16 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Unsigned16, additive-expr, object-type, record-type, optional-type @@ -2963,7 +2984,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a negative Signed8 +Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a Unsigned16 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Unsigned16, additive-expr, object-type, record-type, optional-type, unary-minus @@ -2987,8 +3008,8 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a positive Signed8 integer - and value of the second expression is a Unsigned32 integer. +Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive + Signed8 integer and value of the second expression is a Unsigned32 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Unsigned32, additive-expr, object-type, record-type, optional-type @@ -3011,7 +3032,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a negative Signed8 +Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a Unsigned32 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Unsigned32, additive-expr, object-type, record-type, optional-type, unary-minus @@ -3035,7 +3056,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a positive Signed16 +Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed16 integer and value of the second expression is a positive integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, object-type, record-type, optional-type @@ -3059,7 +3080,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a negative Signed16 +Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a negative integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus @@ -3083,7 +3104,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a negative Signed16 +Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a positive integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus @@ -3107,7 +3128,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a positive Signed16 +Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed16 integer and value of the second expression is a positive Signed8 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Signed8, additive-expr, object-type, record-type, optional-type @@ -3131,7 +3152,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a negative Signed16 +Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a negative Signed8 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus @@ -3155,7 +3176,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a negative Signed16 +Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a positive Signed8 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus @@ -3179,7 +3200,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a positive Signed16 +Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed16 integer and value of the second expression is a positive Signed32 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Signed32, additive-expr, object-type, record-type, optional-type @@ -3203,7 +3224,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a negative Signed16 +Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a negative Signed32 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus @@ -3227,7 +3248,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a negative Signed16 +Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a positive Signed32 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus @@ -3251,7 +3272,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a positive Signed16 +Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed16 integer and value of the second expression is a Unsigned8 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Unsigned8, additive-expr, object-type, record-type, optional-type @@ -3275,7 +3296,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a negative Signed16 +Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a Unsigned8 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Unsigned8, additive-expr, object-type, record-type, optional-type, unary-minus @@ -3299,7 +3320,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a positive Signed16 +Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed16 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, byte, additive-expr, object-type, record-type, @@ -3324,7 +3345,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a negative Signed16 +Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, byte, additive-expr, object-type, record-type, @@ -3349,7 +3370,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a positive Signed16 +Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed16 integer and value of the second expression is a Unsigned16 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Unsigned16, additive-expr, object-type, record-type, optional-type @@ -3373,7 +3394,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a negative Signed16 +Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a Unsigned16 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Unsigned16, additive-expr, object-type, record-type, optional-type, unary-minus @@ -3397,7 +3418,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a positive Signed16 +Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed16 integer and value of the second expression is a Unsigned32 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Unsigned32, additive-expr, object-type, record-type, optional-type @@ -3421,7 +3442,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a negative Signed16 +Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a Unsigned32 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Unsigned32, additive-expr, object-type, record-type, optional-type, unary-minus @@ -3445,7 +3466,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a positive Signed32 +Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed32 integer and value of the second expression is a positive integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, object-type, record-type, optional-type @@ -3469,7 +3490,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a negative Signed32 +Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a negative integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus @@ -3493,7 +3514,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a negative Signed32 +Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a positive integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus @@ -3517,7 +3538,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a positive Signed32 +Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed32 integer and value of the second expression is a positive Signed8 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Signed8, additive-expr, object-type, record-type, optional-type @@ -3541,7 +3562,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a negative Signed32 +Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a negative Signed8 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus @@ -3565,7 +3586,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a negative Signed32 +Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a positive Signed8 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus @@ -3589,7 +3610,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a positive Signed32 +Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed32 integer and value of the second expression is a positive Signed16 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Signed16, additive-expr, object-type, record-type, optional-type @@ -3613,7 +3634,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a negative Signed32 +Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a negative Signed16 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus @@ -3637,7 +3658,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a negative Signed32 +Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a positive Signed16 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus @@ -3661,7 +3682,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a positive Signed32 +Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed32 integer and value of the second expression is a Unsigned8 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Unsigned8, additive-expr, object-type, record-type, optional-type @@ -3685,7 +3706,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a negative Signed32 +Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a Unsigned8 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Unsigned8, additive-expr, object-type, record-type, optional-type, unary-minus @@ -3709,7 +3730,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a positive Signed32 +Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed32 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, bye, additive-expr, object-type, record-type, @@ -3734,7 +3755,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a negative Signed32 +Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, byte, additive-expr, object-type, record-type, @@ -3759,7 +3780,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a positive Signed32 +Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed32 integer and value of the second expression is a Unsigned16 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Unsigned16, additive-expr, object-type, record-type, optional-type @@ -3783,7 +3804,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a negative Signed32 +Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a Unsigned16 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Unsigned16, additive-expr, object-type, record-type, optional-type, unary-minus @@ -3807,7 +3828,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a positive Signed32 +Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed32 integer and value of the second expression is a Unsigned32 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Unsigned32, additive-expr, object-type, record-type, optional-type @@ -3831,7 +3852,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a negative Signed32 +Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a Unsigned32 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Unsigned32, additive-expr, object-type, record-type, optional-type, unary-minus @@ -3855,7 +3876,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a Unsigned8 +Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned8 integer and value of the second expression is a positive integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, additive-expr, object-type, record-type, optional-type @@ -3879,7 +3900,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a Unsigned8 +Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned8 integer and value of the second expression is a positive Signed8 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, int:Signed8, additive-expr, object-type, record-type, optional-type @@ -3904,7 +3925,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a Unsigned8 +Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned8 integer and value of the second expression is a positive Signed16 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, int:Signed16, additive-expr, object-type, record-type, optional-type @@ -3928,7 +3949,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a Unsigned8 +Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned8 integer and value of the second expression is a positive Signed32 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, int:Signed32, additive-expr, object-type, record-type, optional-type @@ -3952,7 +3973,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a Unsigned8 +Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned8 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, byte, additive-expr, object-type, record-type, @@ -3977,7 +3998,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a Unsigned8 +Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned8 integer and value of the second expression is a Unsigned16 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, int:Unsigned16, additive-expr, object-type, record-type, optional-type @@ -4001,7 +4022,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a Unsigned8 +Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned8 integer and value of the second expression is a Unsigned32 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, int:Unsigned32, additive-expr, object-type, record-type, optional-type @@ -4026,7 +4047,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a Unsigned16 +Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned16 integer and value of the second expression is a positive integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, additive-expr, object-type, record-type, optional-type @@ -4050,7 +4071,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a Unsigned16 +Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned16 integer and value of the second expression is a positive Signed8 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, int:Signed8, additive-expr, object-type, record-type, optional-type @@ -4074,7 +4095,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a Unsigned16 +Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned16 integer and value of the second expression is a positive Signed16 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, int:Signed16, additive-expr, object-type, record-type, optional-type @@ -4098,7 +4119,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a Unsigned16 +Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned16 integer and value of the second expression is a positive Signed32 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, int:Signed32, additive-expr, object-type, record-type, optional-type @@ -4122,7 +4143,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a Unsigned16 +Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned16 integer and value of the second expression is a Unsigned8 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, int:Unsigned8, additive-expr, object-type, record-type, optional-type @@ -4147,7 +4168,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a Unsigned16 integer +Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned16 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, byte, additive-expr, object-type, record-type, @@ -4172,7 +4193,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a Unsigned16 +Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned16 integer and value of the second expression is a Unsigned32 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, int:Unsigned32, additive-expr, object-type, record-type, optional-type @@ -4196,7 +4217,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a Unsigned32 +Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned32 integer and value of the second expression is a positive integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, additive-expr, object-type, record-type, optional-type @@ -4220,7 +4241,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a Unsigned32 +Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned32 integer and value of the second expression is a positive Signed8 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, int:Signed8, additive-expr, object-type, record-type, optional-type @@ -4244,7 +4265,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a Unsigned32 +Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned32 integer and value of the second expression is a positive Signed16 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, int:Signed16, additive-expr, object-type, record-type, optional-type @@ -4268,7 +4289,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a Unsigned32 +Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned32 integer and value of the second expression is a positive Signed32 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, int:Signed32, additive-expr, object-type, record-type, optional-type @@ -4292,7 +4313,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a Unsigned32 +Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned32 integer and value of the second expression is a Unsigned8 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, int:Unsigned8, additive-expr, object-type, record-type, optional-type @@ -4316,7 +4337,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a Unsigned32 +Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned32 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, byte, additive-expr, object-type, record-type, @@ -4341,7 +4362,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a Unsigned32 +Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned32 integer and value of the second expression is a Unsigned16 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, int:Unsigned16, additive-expr, object-type, record-type, optional-type @@ -4365,7 +4386,8 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when values of expressions are of user-defined subtypes of int. +Description: Test range expression (exclusive) with iterable object when values of both expressions are of + user-defined subtypes of int. Fail-Issue: ballerina-platform/ballerina-lang#33139 Labels: range-expr, iterable-object, int, DecimalNumber, singleton-type, union-type, module-type-decl, additive-expr, object-type, record-type, optional-type @@ -4391,7 +4413,8 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when values of expressions are of union of int subtypes. +Description: Test range expression (exclusive) with iterable object when values of both expressions are of union of + int subtypes. Fail-Issue: ballerina-platform/ballerina-lang#33139 Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Unsigned32, union-type, additive-expr, object-type, record-type, optional-type @@ -4415,7 +4438,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when the value of the first expression and the value of the +Description: Test range expression (exclusive) with iterable object when the value of the first expression and the value of the second expression is equal. Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, object-type, record-type, optional-type @@ -4438,7 +4461,7 @@ function init() { } Test-Case: output -Description: Test range expression when the value of the first expression is less than the +Description: Test range expression (exclusive) when the value of the first expression is less than the value of the second expression. Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, object-type, record-type, optional-type @@ -4461,7 +4484,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when the types of the expressions are inferred. +Description: Test range expression (exclusive) with iterable object when the types of the expressions are inferred. Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, object-type, record-type, optional-type, var function init() { @@ -4483,7 +4506,7 @@ function init() { } Test-Case: output -Description: Test range expression when the types of the expressions and type of the range expression are inferred. +Description: Test range expression (exclusive) when the types of the expressions and type of the range expression are inferred. Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, var function init() { @@ -4500,7 +4523,7 @@ function init() { } Test-Case: output -Description: Test range expression at module level. +Description: Test range expression (exclusive) at module level. Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, object-type, record-type, optional-type, var int startIndex = 1; @@ -4523,7 +4546,7 @@ function init() { } Test-Case: output -Description: Test range expression at module level. +Description: Test range expression (exclusive) at module level. Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, var int startIndex = 1; @@ -4541,7 +4564,7 @@ function init() { } Test-Case: output -Description: Test iterable object returned by the range expression. +Description: Test iterable object returned by the range expression (exclusive). Labels: range-expr, int, DecimalNumber, object-type, optional-type, var, value:toBalString, method-call-expr function init() { @@ -4567,7 +4590,7 @@ function init() { } Test-Case: output -Description: Test field and member access as expressions in range expression. +Description: Test field and member access as expressions in range expression (exclusive). Labels: range-expr, iterable-object, array-type, DecimalNumber, field-access-expr, int, list-constructor, mapping-constructor, member-access-expr, module-type-defn, object-type, record-type, optional-type @@ -4594,7 +4617,7 @@ function init() { } Test-Case: output -Description: Test function and method call as expressions in range expression. +Description: Test function and method call as expressions in range expression (exclusive). Labels: range-expr, iterable-object, DecimalNumber, int, explicit-new-expr, function-call-expr module-class-defn, method-call-expr, object-type, record-type, optional-type @@ -4626,7 +4649,7 @@ function getInt() returns int { } Test-Case: output -Description: Test type cast expression as expressions in range expression. +Description: Test type cast expression as expressions in range expression (exclusive). Labels: range-expr, iterable-object, DecimalNumber, int, type-cast-expr, object-type, record-type, optional-type function init() { @@ -4646,7 +4669,7 @@ function init() { } Test-Case: output -Description: Test unary expressions as expressions in range expression. +Description: Test unary expressions as expressions in range expression (exclusive). Labels: range-expr, iterable-object, DecimalNumber, int, unary-complement, unary-minus, unary-plus, object-type, record-type, optional-type @@ -4675,7 +4698,7 @@ function init() { } Test-Case: output -Description: Test additive expression as expressions in range expression. +Description: Test additive expression as expressions in range expression (exclusive). Labels: range-expr, iterable-object, additive-expr, int, DecimalNumber, object-type, record-type, optional-type function init() { @@ -4695,7 +4718,7 @@ function init() { } Test-Case: output -Description: Test multiplicative expressions as expressions in range expression. +Description: Test multiplicative expressions as expressions in range expression (exclusive). Labels: range-expr, iterable-object, additive-expr, DecimalNumber, int, multiplicative-expr, object-type, record-type, optional-type @@ -4724,7 +4747,7 @@ function init() { } Test-Case: output -Description: Test binary bitwise expressions as expressions in range expression. +Description: Test binary bitwise expressions as expressions in range expression (exclusive). Labels: range-expr, iterable-object, binary-bitwise-expr, DecimalNumber, int, additive-expr, object-type, record-type, optional-type @@ -4753,7 +4776,7 @@ function init() { } Test-Case: output -Description: Test checking expressions as expressions in range expression. +Description: Test checking expressions as expressions in range expression (exclusive). Labels: range-expr, iterable-object, check, checkpanic, DecimalNumber, error, additive-expr, int, union-type, object-type, record-type, optional-type @@ -4776,7 +4799,7 @@ function init() returns error? { } Test-Case: output -Description: Test let expression as expressions in range expression. +Description: Test let expression as expressions in range expression (exclusive). Labels: range-expr, iterable-object, DecimalNumber, int, let-expr, additive-expr, object-type, record-type, optional-type @@ -4797,7 +4820,7 @@ function init() { } Test-Case: output -Description: Test shift expressions as expressions in range expression. +Description: Test shift expressions as expressions in range expression (exclusive). Labels: range-expr, iterable-object, DecimalNumber, int, shift-expr, additive-expr, object-type, record-type, optional-type @@ -4818,7 +4841,7 @@ function init() { } Test-Case: output -Description: Test conditional expressions as expressions in range expression. +Description: Test conditional expressions as expressions in range expression (exclusive). Labels: range-expr, iterable-object, conditional-expr, DecimalNumber, error, int, additive-expr, nil-literal, optional-type, union-type, object-type, record-type @@ -4841,7 +4864,7 @@ function init() { } Test-Case: output -Description: Test lang.int constants as expressions in range expression. +Description: Test lang.int constants as expressions in range expression (exclusive). Labels: range-expr, iterable-object, int, DecimalNumber, int:SIGNED8_MAX_VALUE, int:UNSIGNED8_MAX_VALUE, additive-expr, object-type, record-type, optional-type @@ -4862,7 +4885,7 @@ function init() { } Test-Case: output -Description: Test isolatedness of range expression. +Description: Test isolatedness of range expression (exclusive). Fail-Issue: ballerina-platform/ballerina-lang#33163 Labels: range-expr, iterable-object, object-type, additive-expr, int, DecimalNumber, function-call-expr, record-type, optional-type, lock-stmt @@ -4889,7 +4912,7 @@ function getRange() returns object { } Test-Case: output -Description: Test isolatedness of range expression. +Description: Test isolatedness of range expression (exclusive). Fail-Issue: ballerina-platform/ballerina-lang#33163 Labels: range-expr, object-type, record-type, int, optional-type, is-expr, any, type-cast-expr @@ -4905,7 +4928,7 @@ function init() { } Test-Case: output -Description: Test isolatedness of range expression. +Description: Test isolatedness of range expression (exclusive). Fail-Issue: ballerina-platform/ballerina-lang#33163 Labels: range-expr, object-type, int, DecimalNumber, record-type, optional-type, is-expr, method-call-expr @@ -4921,9 +4944,8 @@ function init() { io:println(range.iterator().next() is isolated function); // @output true } - Test-Case: output -Description: Test range expression with query expression. +Description: Test range expression (exclusive) with query expression. Labels: range-expr, array-type, int, DecimalNumber, query-expr function init() { @@ -4934,7 +4956,7 @@ function init() { } Test-Case: error -Description: Test range expression when static type of either of the expression is not a subtype of int. +Description: Test range expression (exclusive) when static type of either of the expression is not a subtype of int. Labels: range-expr, int, DecimalFloatingPointNumber, string function init() { @@ -4948,7 +4970,7 @@ function init() { } Test-Case: error -Description: Test assigning the result of range expression to an incompatible type. +Description: Test assigning the result of range expression (exclusive) to an incompatible type. Labels: range-expr, int, DecimalNumber, object-type, float, record-type, optional-type function init() { @@ -4962,7 +4984,7 @@ function init() { } Test-Case: error -Description: Test assigning the result of range expression to an incompatible type when the static +Description: Test assigning the result of range expression (exclusive) to an incompatible type when the static type of the range expression is inferred. Labels: range-expr, int, DecimalNumber, object-type, var, record-type, optional-type, float diff --git a/conformance/lang/expressions/range-expr/range_expr_inclusive.balt b/conformance/lang/expressions/range-expr/range_expr_inclusive.balt index 50c038be..e86e76f3 100644 --- a/conformance/lang/expressions/range-expr/range_expr_inclusive.balt +++ b/conformance/lang/expressions/range-expr/range_expr_inclusive.balt @@ -1,5 +1,5 @@ Test-Case: output -Description: Test range expression when values of expressions are positive integers +Description: Test range expression (inclusive) when values of both expressions are positive integers. Labels: range-expr, iterable-inclusive, int, DecimalNumber, additive-expr function init() { @@ -13,7 +13,7 @@ function init() { } Test-Case: output -Description: Test range expression when values of expressions are negative integers +Description: Test range expression (inclusive) when values of both expressions are negative integers. Labels: range-expr, iterable-inclusive, int, DecimalNumber, unary-minus, additive-expr function init() { @@ -27,7 +27,8 @@ function init() { } Test-Case: output -Description: Test range expression when values of expressions are integers +Description: Test range expression (inclusive) when the value of one expression is a negative integer and + the value of the other expression is a positive integer. Labels: range-expr, iterable-inclusive, int, DecimalNumber, unary-minus, additive-expr function init() { @@ -41,7 +42,8 @@ function init() { } Test-Case: output -Description: Test range expression when values of both expressions are integers +Description: Test range expression (inclusive) when the value of one expression is a negative integer and + the value of the other expression is a positive integer. Labels: range-expr, iterable-inclusive, int, DecimalNumber, unary-minus, additive-expr function init() { @@ -55,7 +57,7 @@ function init() { } Test-Case: output -Description: Test range expression when values of expressions are positive Signed8 integers +Description: Test range expression (inclusive) when values of both expressions are positive Signed8 integers. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, additive-expr function init() { @@ -69,7 +71,7 @@ function init() { } Test-Case: output -Description: Test range expression when values of expressions are negative Signed8 integers +Description: Test range expression (inclusive) when values of both expressions are negative Signed8 integers. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, unary-minus, additive-expr function init() { @@ -83,7 +85,8 @@ function init() { } Test-Case: output -Description: Test range expression when values of expressions are Signed8 integers +Description: Test range expression (inclusive) when the value of one expression is a negative Signed8 integer and + the value of the other expression is a positive Signed8 integer. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, unary-minus, additive-expr function init() { @@ -97,7 +100,7 @@ function init() { } Test-Case: output -Description: Test range expression when values of expressions are positive Signed16 integers +Description: Test range expression (inclusive) when values of both expressions are positive Signed16 integers. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed16, additive-expr function init() { @@ -111,7 +114,7 @@ function init() { } Test-Case: output -Description: Test range expression when values of expressions are negative Signed16 integers +Description: Test range expression (inclusive) when values of both expressions are negative Signed16 integers. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed16, unary-minus, additive-expr function init() { @@ -125,7 +128,8 @@ function init() { } Test-Case: output -Description: Test range expression when values of expressions are Signed16 integers +Description: Test range expression (inclusive) when the value of one expression is a negative Signed16 integer and + the value of the other expression is a positive Signed16 integer. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed16, unary-minus, additive-expr function init() { @@ -139,7 +143,7 @@ function init() { } Test-Case: output -Description: Test range expression when values of expressions are positive Signed32 integers +Description: Test range expression (inclusive) when values of both expressions are positive Signed32 integers. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed32, additive-expr function init() { @@ -153,7 +157,7 @@ function init() { } Test-Case: output -Description: Test range expression when values of expressions are negative Signed32 integers +Description: Test range expression (inclusive) when values of both expressions are negative Signed32 integers. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed32, unary-minus, additive-expr function init() { @@ -167,7 +171,8 @@ function init() { } Test-Case: output -Description: Test range expression when values of expressions are Signed32 integers +Description: Test range expression (inclusive) when the value of one expression is a negative Signed32 integer and + the value of the other expression is a positive Signed32 integer. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed32, unary-minus, additive-expr function init() { @@ -181,7 +186,7 @@ function init() { } Test-Case: output -Description: Test range expression when values of expressions are Unsigned8 integers +Description: Test range expression (inclusive) when values of both expressions are Unsigned8 integers. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Unsigned8, additive-expr function init() { @@ -195,7 +200,7 @@ function init() { } Test-Case: output -Description: Test range expression when values of expressions are Unsigned16 integers +Description: Test range expression (inclusive) when values of both expressions are Unsigned16 integers. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Unsigned16, additive-expr function init() { @@ -209,7 +214,7 @@ function init() { } Test-Case: output -Description: Test range expression when values of expressions are Unsigned32 integers +Description: Test range expression (inclusive) when values of both expressions are Unsigned32 integers. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Unsigned32, additive-expr function init() { @@ -223,7 +228,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a positive integer and value of the +Description: Test range expression (inclusive) when value of the first expression is a positive integer and value of the second expression is a positive Signed8 integer. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, additive-expr @@ -238,7 +243,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a negative integer and value of the +Description: Test range expression (inclusive) when value of the first expression is a negative integer and value of the second expression is a negative Signed8 integer. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, unary-minus, additive-expr @@ -253,7 +258,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a negative integer and value of the +Description: Test range expression (inclusive) when value of the first expression is a negative integer and value of the second expression is a positive Signed8 integer. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, unary-minus, additive-expr @@ -268,7 +273,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a positive integer and value of the +Description: Test range expression (inclusive) when value of the first expression is a positive integer and value of the second expression is a positive Signed16 integer. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed16, additive-expr @@ -283,7 +288,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a negative integer and value of the +Description: Test range expression (inclusive) when value of the first expression is a negative integer and value of the second expression is a negative Signed16 integer. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed16, unary-minus, additive-expr @@ -298,7 +303,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a negative integer and value of the +Description: Test range expression (inclusive) when value of the first expression is a negative integer and value of the second expression is a positive Signed16 integer. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed16, unary-minus, additive-expr @@ -313,7 +318,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a positive integer and value of the +Description: Test range expression (inclusive) when value of the first expression is a positive integer and value of the second expression is a positive Signed32 integer. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed32, additive-expr @@ -328,7 +333,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a negative integer and value of the +Description: Test range expression (inclusive) when value of the first expression is a negative integer and value of the second expression is a negative Signed32 integer. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed32, unary-minus, additive-expr @@ -343,7 +348,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a negative integer and value of the +Description: Test range expression (inclusive) when value of the first expression is a negative integer and value of the second expression is a positive Signed32 integer. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed32, unary-minus, additive-expr @@ -358,7 +363,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a positive integer and value of the +Description: Test range expression (inclusive) when value of the first expression is a positive integer and value of the second expression is a Unsigned8 integer. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Unsigned8, additive-expr @@ -373,7 +378,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a negative integer and value of the +Description: Test range expression (inclusive) when value of the first expression is a negative integer and value of the second expression is a Unsigned8 integer. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Unsigned8, unary-minus, additive-expr @@ -388,7 +393,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a positive integer and value of the +Description: Test range expression (inclusive) when value of the first expression is a positive integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 Labels: range-expr, iterable-inclusive, int, DecimalNumber, byte, additive-expr @@ -404,7 +409,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a negative integer and value of the +Description: Test range expression (inclusive) when value of the first expression is a negative integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 Labels: range-expr, iterable-inclusive, int, DecimalNumber, byte, unary-minus, additive-expr @@ -420,7 +425,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a positive integer and value of the +Description: Test range expression (inclusive) when value of the first expression is a positive integer and value of the second expression is a Unsigned16 integer. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Unsigned16, additive-expr @@ -435,7 +440,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a negative integer and value of the +Description: Test range expression (inclusive) when value of the first expression is a negative integer and value of the second expression is a Unsigned16 integer. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Unsigned16, unary-minus, additive-expr @@ -450,7 +455,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a positive integer and value of the +Description: Test range expression (inclusive) when value of the first expression is a positive integer and value of the second expression is a Unsigned32 integer. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Unsigned32, additive-expr @@ -465,7 +470,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a negative integer and value of the +Description: Test range expression (inclusive) when value of the first expression is a negative integer and value of the second expression is a Unsigned32 integer. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Unsigned32, unary-minus, additive-expr @@ -480,8 +485,8 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a positive Signed8 integer and value of the - second expression is a positive integer. +Description: Test range expression (inclusive) when value of the first expression is a positive Signed8 integer + and value of the second expression is a positive integer. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, additive-expr function init() { @@ -495,8 +500,8 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a negative Signed8 integer and value of the - second expression is a negative integer. +Description: Test range expression (inclusive) when value of the first expression is a negative Signed8 integer and + value of the second expression is a negative integer. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, unary-minus, additive-expr function init() { @@ -510,8 +515,8 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a negative Signed8 integer and value of the - second expression is a positive integer. +Description: Test range expression (inclusive) when value of the first expression is a negative Signed8 integer and + value of the second expression is a positive integer. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, unary-minus, additive-expr function init() { @@ -525,8 +530,8 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a positive Signed8 integer and value of the - second expression is a positive Signed16 integer. +Description: Test range expression (inclusive) when value of the first expression is a positive Signed8 integer and + value of the second expression is a positive Signed16 integer. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, int:Signed16, additive-expr function init() { @@ -540,8 +545,8 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a negative Signed8 integer and value of the - second expression is a negative Signed16 integer. +Description: Test range expression (inclusive) when value of the first expression is a negative Signed8 integer and + value of the second expression is a negative Signed16 integer. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, int:Signed16, unary-minus, additive-expr function init() { @@ -555,8 +560,8 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a negative Signed8 integer and value of the - second expression is a positive Signed16 integer. +Description: Test range expression (inclusive) when value of the first expression is a negative Signed8 integer and + value of the second expression is a positive Signed16 integer. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, int:Signed16, unary-minus, additive-expr function init() { @@ -570,8 +575,8 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a positive Signed8 integer and value of the - second expression is a positive Signed32 integer. +Description: Test range expression (inclusive) when value of the first expression is a positive Signed8 integer and + value of the second expression is a positive Signed32 integer. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, int:Signed32, additive-expr function init() { @@ -585,8 +590,8 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a negative Signed8 integer and value of the - second expression is a negative Signed32 integer. +Description: Test range expression (inclusive) when value of the first expression is a negative Signed8 integer and + value of the second expression is a negative Signed32 integer. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, int:Signed32, unary-minus, additive-expr function init() { @@ -600,8 +605,8 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a negative Signed8 integer and value of the - second expression is a positive Signed32 integer. +Description: Test range expression (inclusive) when value of the first expression is a negative Signed8 integer and + value of the second expression is a positive Signed32 integer. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, int:Signed32, unary-minus, additive-expr function init() { @@ -615,8 +620,8 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a positive Signed8 integer and value of the - second expression is a Unsigned8 integer. +Description: Test range expression (inclusive) when value of the first expression is a positive Signed8 integer and + value of the second expression is a Unsigned8 integer. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, int:Unsigned8, additive-expr function init() { @@ -630,8 +635,8 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a negative Signed8 integer and value of the - second expression is a Unsigned8 integer. +Description: Test range expression (inclusive) when value of the first expression is a negative Signed8 integer and + value of the second expression is a Unsigned8 integer. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, int:Unsigned8, unary-minus, additive-expr function init() { @@ -645,8 +650,8 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a positive Signed8 integer and value of the - second expression is a byte. +Description: Test range expression (inclusive) when value of the first expression is a positive Signed8 integer and + value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, byte, additive-expr @@ -661,8 +666,8 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a negative Signed8 integer and value of the - second expression is a byte. +Description: Test range expression (inclusive) when value of the first expression is a negative Signed8 integer and + value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, byte, unary-minus, additive-expr @@ -677,8 +682,8 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a positive Signed8 integer and value of the - second expression is a Unsigned16 integer. +Description: Test range expression (inclusive) when value of the first expression is a positive Signed8 integer and + value of the second expression is a Unsigned16 integer. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, int:Unsigned16, additive-expr function init() { @@ -692,8 +697,8 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a negative Signed8 integer and value of the - second expression is a Unsigned16 integer. +Description: Test range expression (inclusive) when value of the first expression is a negative Signed8 integer and + value of the second expression is a Unsigned16 integer. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, int:Unsigned16, unary-minus, additive-expr function init() { @@ -707,8 +712,8 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a positive Signed8 integer and value of the - second expression is a Unsigned32 integer. +Description: Test range expression (inclusive) when value of the first expression is a positive Signed8 integer and + value of the second expression is a Unsigned32 integer. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, int:Unsigned32, additive-expr function init() { @@ -722,8 +727,8 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a negative Signed8 integer and value of the - second expression is a Unsigned32 integer. +Description: Test range expression (inclusive) when value of the first expression is a negative Signed8 integer and + value of the second expression is a Unsigned32 integer. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, int:Unsigned32, unary-minus, additive-expr function init() { @@ -737,8 +742,8 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a positive Signed16 integer and value of the - second expression is a positive integer. +Description: Test range expression (inclusive) when value of the first expression is a positive Signed16 integer and + value of the second expression is a positive integer. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed16, additive-expr function init() { @@ -752,8 +757,8 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a negative Signed16 integer and value of the - second expression is a negative integer. +Description: Test range expression (inclusive) when value of the first expression is a negative Signed16 integer and + value of the second expression is a negative integer. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed16, unary-minus, additive-expr function init() { @@ -767,8 +772,8 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a negative Signed16 integer and value of the - second expression is a positive integer. +Description: Test range expression (inclusive) when value of the first expression is a negative Signed16 integer and + value of the second expression is a positive integer. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed16, unary-minus, additive-expr function init() { @@ -782,8 +787,8 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a positive Signed16 integer and value of the - second expression is a positive Signed8 integer. +Description: Test range expression (inclusive) when value of the first expression is a positive Signed16 integer and + value of the second expression is a positive Signed8 integer. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, int:Signed16, additive-expr function init() { @@ -797,8 +802,8 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a negative Signed16 integer and value of the - second expression is a negative Signed8 integer. +Description: Test range expression (inclusive) when value of the first expression is a negative Signed16 integer and + value of the second expression is a negative Signed8 integer. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, int:Signed16, unary-minus, additive-expr function init() { @@ -812,8 +817,8 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a negative Signed16 integer and value of the - second expression is a positive Signed8 integer. +Description: Test range expression (inclusive) when value of the first expression is a negative Signed16 integer and + value of the second expression is a positive Signed8 integer. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, int:Signed16, unary-minus, additive-expr function init() { @@ -827,8 +832,8 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a positive Signed16 integer and value of the - second expression is a positive Signed32 integer. +Description: Test range expression (inclusive) when value of the first expression is a positive Signed16 integer and + value of the second expression is a positive Signed32 integer. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed16, int:Signed32, additive-expr function init() { @@ -842,8 +847,8 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a negative Signed16 integer and value of the - second expression is a negative Signed32 integer. +Description: Test range expression (inclusive) when value of the first expression is a negative Signed16 integer and + value of the second expression is a negative Signed32 integer. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed16, int:Signed32, unary-minus, additive-expr function init() { @@ -857,8 +862,8 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a negative Signed16 integer and value of the - second expression is a positive Signed32 integer. +Description: Test range expression (inclusive) when value of the first expression is a negative Signed16 integer and + value of the second expression is a positive Signed32 integer. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed16, int:Signed32, unary-minus, additive-expr function init() { @@ -872,8 +877,8 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a positive Signed16 integer and value of the - second expression is a Unsigned8 integer. +Description: Test range expression (inclusive) when value of the first expression is a positive Signed16 integer and + value of the second expression is a Unsigned8 integer. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed16, int:Unsigned8, additive-expr function init() { @@ -887,8 +892,8 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a negative Signed16 integer and value of the - second expression is a Unsigned8 integer. +Description: Test range expression (inclusive) when value of the first expression is a negative Signed16 integer and + value of the second expression is a Unsigned8 integer. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed16, int:Unsigned8, unary-minus, additive-expr function init() { @@ -902,8 +907,8 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a positive Signed16 integer and value of the - second expression is a byte. +Description: Test range expression (inclusive) when value of the first expression is a positive Signed16 integer and + value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed16, byte, additive-expr @@ -918,8 +923,8 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a negative Signed16 integer and value of the - second expression is a byte. +Description: Test range expression (inclusive) when value of the first expression is a negative Signed16 integer and + value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed16, byte, unary-minus, additive-expr @@ -934,8 +939,8 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a positive Signed16 integer and value of the - second expression is a Unsigned16 integer. +Description: Test range expression (inclusive) when value of the first expression is a positive Signed16 integer and + value of the second expression is a Unsigned16 integer. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed16, int:Unsigned16, additive-expr function init() { @@ -949,8 +954,8 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a negative Signed16 integer and value of the - second expression is a Unsigned16 integer. +Description: Test range expression (inclusive) when value of the first expression is a negative Signed16 integer and + value of the second expression is a Unsigned16 integer. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed16, int:Unsigned16, unary-minus, additive-expr function init() { @@ -964,8 +969,8 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a positive Signed16 integer and value of the - second expression is a Unsigned32 integer. +Description: Test range expression (inclusive) when value of the first expression is a positive Signed16 integer and + value of the second expression is a Unsigned32 integer. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed16, int:Unsigned32, additive-expr function init() { @@ -979,8 +984,8 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a negative Signed16 integer and value of the - second expression is a Unsigned32 integer. +Description: Test range expression (inclusive) when value of the first expression is a negative Signed16 integer and + value of the second expression is a Unsigned32 integer. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed16, int:Unsigned32, unary-minus, additive-expr function init() { @@ -994,8 +999,8 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a positive Signed32 integer and value of the - second expression is a positive integer. +Description: Test range expression (inclusive) when value of the first expression is a positive Signed32 integer and + value of the second expression is a positive integer. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed32, additive-expr function init() { @@ -1009,8 +1014,8 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a negative Signed32 integer and value of the - second expression is a negative integer. +Description: Test range expression (inclusive) when value of the first expression is a negative Signed32 integer and + value of the second expression is a negative integer. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed32, unary-minus, additive-expr function init() { @@ -1024,8 +1029,8 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a negative Signed32 integer and value of the - second expression is a positive integer. +Description: Test range expression (inclusive) when value of the first expression is a negative Signed32 integer and + value of the second expression is a positive integer. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed32, unary-minus, additive-expr function init() { @@ -1039,8 +1044,8 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a positive Signed32 integer and value of the - second expression is a positive Signed8 integer. +Description: Test range expression (inclusive) when value of the first expression is a positive Signed32 integer and + value of the second expression is a positive Signed8 integer. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, int:Signed32, additive-expr function init() { @@ -1054,8 +1059,8 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a negative Signed32 integer and value of the - second expression is a negative Signed8 integer. +Description: Test range expression (inclusive) when value of the first expression is a negative Signed32 integer and + value of the second expression is a negative Signed8 integer. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, int:Signed32, unary-minus, additive-expr function init() { @@ -1069,8 +1074,8 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a negative Signed32 integer and value of the - second expression is a positive Signed8 integer. +Description: Test range expression (inclusive) when value of the first expression is a negative Signed32 integer and + value of the second expression is a positive Signed8 integer. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, int:Signed32, unary-minus, additive-expr function init() { @@ -1084,8 +1089,8 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a positive Signed32 integer and value of the - second expression is a positive Signed16 integer. +Description: Test range expression (inclusive) when value of the first expression is a positive Signed32 integer and + value of the second expression is a positive Signed16 integer. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed16, int:Signed32, additive-expr function init() { @@ -1099,8 +1104,8 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a negative Signed32 integer and value of the - second expression is a negative Signed16 integer. +Description: Test range expression (inclusive) when value of the first expression is a negative Signed32 integer and + value of the second expression is a negative Signed16 integer. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed16, int:Signed32, unary-minus, additive-expr function init() { @@ -1114,8 +1119,8 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a negative Signed32 integer and value of the - second expression is a positive Signed16 integer. +Description: Test range expression (inclusive) when value of the first expression is a negative Signed32 integer and + value of the second expression is a positive Signed16 integer. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed16, int:Signed32, unary-minus, additive-expr function init() { @@ -1129,8 +1134,8 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a positive Signed32 integer and value of the - second expression is a Unsigned8 integer. +Description: Test range expression (inclusive) when value of the first expression is a positive Signed32 integer and + value of the second expression is a Unsigned8 integer. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed32, int:Unsigned8, additive-expr function init() { @@ -1144,8 +1149,8 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a negative Signed32 integer and value of the - second expression is a Unsigned8 integer. +Description: Test range expression (inclusive) when value of the first expression is a negative Signed32 integer and + value of the second expression is a Unsigned8 integer. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed32, int:Unsigned8, unary-minus, additive-expr function init() { @@ -1159,8 +1164,8 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a positive Signed32 integer and value of the - second expression is a byte. +Description: Test range expression (inclusive) when value of the first expression is a positive Signed32 integer and + value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed32, byte, additive-expr @@ -1175,8 +1180,8 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a negative Signed32 integer and value of the - second expression is a byte. +Description: Test range expression (inclusive) when value of the first expression is a negative Signed32 integer and + value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed32, byte, unary-minus, additive-expr @@ -1191,8 +1196,8 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a positive Signed32 integer and value of the - second expression is a Unsigned16 integer. +Description: Test range expression (inclusive) when value of the first expression is a positive Signed32 integer and + value of the second expression is a Unsigned16 integer. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed32, int:Unsigned16, additive-expr function init() { @@ -1206,8 +1211,8 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a negative Signed32 integer and value of the - second expression is a Unsigned16 integer. +Description: Test range expression (inclusive) when value of the first expression is a negative Signed32 integer and + value of the second expression is a Unsigned16 integer. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed32, int:Unsigned16, unary-minus, additive-expr function init() { @@ -1221,8 +1226,8 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a positive Signed32 integer and value of the - second expression is a Unsigned32 integer. +Description: Test range expression (inclusive) when value of the first expression is a positive Signed32 integer and + value of the second expression is a Unsigned32 integer. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed32, int:Unsigned32, additive-expr function init() { @@ -1236,8 +1241,8 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a negative Signed32 integer and value of the - second expression is a Unsigned32 integer. +Description: Test range expression (inclusive) when value of the first expression is a negative Signed32 integer and + value of the second expression is a Unsigned32 integer. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed32, int:Unsigned32, unary-minus, additive-expr function init() { @@ -1251,7 +1256,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a Unsigned8 integer and value of the +Description: Test range expression (inclusive) when value of the first expression is a Unsigned8 integer and value of the second expression is a positive integer. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Unsigned8, additive-expr @@ -1266,7 +1271,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a Unsigned8 integer and value of the +Description: Test range expression (inclusive) when value of the first expression is a Unsigned8 integer and value of the second expression is a positive Signed8 integer. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, int:Unsigned8, additive-expr @@ -1281,7 +1286,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a Unsigned8 integer and value of the +Description: Test range expression (inclusive) when value of the first expression is a Unsigned8 integer and value of the second expression is a positive Signed16 integer. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed16, int:Unsigned8, additive-expr @@ -1296,7 +1301,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a Unsigned8 integer and value of the +Description: Test range expression (inclusive) when value of the first expression is a Unsigned8 integer and value of the second expression is a positive Signed32 integer. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed32, int:Unsigned8, additive-expr @@ -1311,7 +1316,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a Unsigned8 integer and value of the +Description: Test range expression (inclusive) when value of the first expression is a Unsigned8 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Unsigned8, byte, additive-expr @@ -1327,7 +1332,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a Unsigned8 integer and value of the +Description: Test range expression (inclusive) when value of the first expression is a Unsigned8 integer and value of the second expression is a Unsigned16 integer. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Unsigned8, int:Unsigned16, additive-expr @@ -1342,7 +1347,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a Unsigned8 integer and value of the +Description: Test range expression (inclusive) when value of the first expression is a Unsigned8 integer and value of the second expression is a Unsigned32 integer. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Unsigned8, int:Unsigned32, additive-expr @@ -1357,7 +1362,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a Unsigned16 integer and value of the +Description: Test range expression (inclusive) when value of the first expression is a Unsigned16 integer and value of the second expression is a positive integer. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Unsigned16, additive-expr @@ -1372,7 +1377,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a Unsigned16 integer and value of the +Description: Test range expression (inclusive) when value of the first expression is a Unsigned16 integer and value of the second expression is a positive Signed8 integer. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, int:Unsigned16, additive-expr @@ -1387,7 +1392,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a Unsigned16 integer and value of the +Description: Test range expression (inclusive) when value of the first expression is a Unsigned16 integer and value of the second expression is a positive Signed16 integer. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed16, int:Unsigned16, additive-expr @@ -1402,7 +1407,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a Unsigned16 integer and value of the +Description: Test range expression (inclusive) when value of the first expression is a Unsigned16 integer and value of the second expression is a positive Signed32 integer. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed32, int:Unsigned16, additive-expr @@ -1417,7 +1422,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a Unsigned16 integer and value of the +Description: Test range expression (inclusive) when value of the first expression is a Unsigned16 integer and value of the second expression is a Unsigned8 integer. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Unsigned8, int:Unsigned16, additive-expr @@ -1432,7 +1437,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a Unsigned16 integer and value of the +Description: Test range expression (inclusive) when value of the first expression is a Unsigned16 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Unsigned16, byte, additive-expr @@ -1448,7 +1453,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a Unsigned16 integer and value of the +Description: Test range expression (inclusive) when value of the first expression is a Unsigned16 integer and value of the second expression is a Unsigned32 integer. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Unsigned16, int:Unsigned32, additive-expr @@ -1463,7 +1468,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a Unsigned32 integer and value of the +Description: Test range expression (inclusive) when value of the first expression is a Unsigned32 integer and value of the second expression is a positive integer. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Unsigned32, additive-expr @@ -1478,7 +1483,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a Unsigned32 integer and value of the +Description: Test range expression (inclusive) when value of the first expression is a Unsigned32 integer and value of the second expression is a positive Signed8 integer. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, int:Unsigned32, additive-expr @@ -1493,7 +1498,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a Unsigned32 integer and value of the +Description: Test range expression (inclusive) when value of the first expression is a Unsigned32 integer and value of the second expression is a positive Signed16 integer. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed16, int:Unsigned32, additive-expr @@ -1508,7 +1513,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a Unsigned32 integer and value of the +Description: Test range expression (inclusive) when value of the first expression is a Unsigned32 integer and value of the second expression is a positive Signed32 integer. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed32, int:Unsigned32, additive-expr @@ -1523,7 +1528,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a Unsigned32 integer and value of the +Description: Test range expression (inclusive) when value of the first expression is a Unsigned32 integer and value of the second expression is a Unsigned8 integer. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Unsigned8, int:Unsigned32, additive-expr @@ -1538,7 +1543,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a Unsigned32 integer and value of the +Description: Test range expression (inclusive) when value of the first expression is a Unsigned32 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Unsigned32, byte, additive-expr @@ -1554,7 +1559,7 @@ function init() { } Test-Case: output -Description: Test range expression when value of the first expression is a Unsigned32 integer and value of the +Description: Test range expression (inclusive) when value of the first expression is a Unsigned32 integer and value of the second expression is a Unsigned16 integer. Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Unsigned16, int:Unsigned32, additive-expr @@ -1569,7 +1574,7 @@ function init() { } Test-Case: output -Description: Test range expression when values of expressions are of user-defined subtypes of int. +Description: Test range expression (inclusive) when values of both expressions are of user-defined subtypes of int. Fail-Issue: ballerina-platform/ballerina-lang#33139 Labels: range-expr, iterable-inclusive, int, DecimalNumber, singleton-type, union-type, module-type-decl, additive-expr @@ -1587,7 +1592,7 @@ function init() { } Test-Case: output -Description: Test range expression when values of expressions are of union of int subtypes. +Description: Test range expression (inclusive) when values of both expressions are of union of int subtypes. Fail-Issue: ballerina-platform/ballerina-lang#33139 Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, int:Unsigned32, union-type, additive-expr @@ -1602,8 +1607,8 @@ function init() { } Test-Case: output -Description: Test range expression when the value of the first expression and the value of the second expression - is equal. +Description: Test range expression (inclusive) when the value of the first expression and the value of the + second expression is equal. Labels: range-expr, iterable-inclusive, int, DecimalNumber, additive-expr function init() { @@ -1618,7 +1623,7 @@ function init() { } Test-Case: output -Description: Test range expression when the value of the first expression is less than the +Description: Test range expression (inclusive) when the value of the first expression is less than the value of the second expression. Labels: range-expr, iterable-inclusive, int, DecimalNumber, additive-expr @@ -1634,7 +1639,7 @@ function init() { } Test-Case: output -Description: Test range expression when the types of the expressions are inferred. +Description: Test range expression (inclusive) when the types of the expressions are inferred. Labels: range-expr, iterable-inclusive, int, DecimalNumber, additive-expr, var function init() { @@ -1649,7 +1654,7 @@ function init() { } Test-Case: output -Description: Test field and member access as expressions in range expression. +Description: Test field and member access as expressions in range expression (inclusive). Labels: range-expr, iterable-inclusive, array-type, DecimalNumber, field-access-expr, int, list-constructor, mapping-constructor, member-access-expr, module-type-defn, record-type @@ -1669,7 +1674,7 @@ function init() { } Test-Case: output -Description: Test function and method call as expressions in range expression. +Description: Test function and method call as expressions in range expression (inclusive). Labels: range-expr, iterable-inclusive, DecimalNumber, int, explicit-new-expr, function-call-expr module-class-defn, method-call-expr @@ -1694,7 +1699,7 @@ function getInt() returns int { } Test-Case: output -Description: Test type cast expression as expressions in range expression. +Description: Test type cast expression as expressions in range expression (inclusive). Labels: range-expr, iterable-inclusive, DecimalNumber, int, type-cast-expr, additive-expr function init() { @@ -1707,7 +1712,7 @@ function init() { } Test-Case: output -Description: Test unary expressions as expressions in range expression. +Description: Test unary expressions as expressions in range expression (inclusive). Labels: range-expr, iterable-inclusive, DecimalNumber, int, unary-complement, unary-minus, unary-plus function init() { @@ -1726,7 +1731,7 @@ function init() { } Test-Case: output -Description: Test additive expression as expressions in range expression. +Description: Test additive expression as expressions in range expression (inclusive). Labels: range-expr, iterable-inclusive, additive-expr, int, DecimalNumber function init() { @@ -1739,7 +1744,7 @@ function init() { } Test-Case: output -Description: Test multiplicative expressions as expressions in range expression. +Description: Test multiplicative expressions as expressions in range expression (inclusive). Labels: range-expr, iterable-inclusive, DecimalNumber, int, multiplicative-expr function init() { @@ -1758,7 +1763,7 @@ function init() { } Test-Case: output -Description: Test binary bitwise expressions as expressions in range expression. +Description: Test binary bitwise expressions as expressions in range expression (inclusive). Labels: range-expr, iterable-inclusive, binary-bitwise-expr, DecimalNumber, int function init() { @@ -1777,7 +1782,7 @@ function init() { } Test-Case: output -Description: Test checking expressions as expressions in range expression. +Description: Test checking expressions as expressions in range expression (inclusive). Labels: range-expr, iterable-inclusive, check, checkpanic, DecimalNumber, error, int, union-type, optional-type function init() returns error? { @@ -1792,7 +1797,7 @@ function init() returns error? { } Test-Case: output -Description: Test let expression as expressions in range expression. +Description: Test let expression as expressions in range expression (inclusive). Labels: range-expr, iterable-inclusive, DecimalNumber, int, let-expr function init() { @@ -1805,7 +1810,7 @@ function init() { } Test-Case: output -Description: Test shift expressions as expressions in range expression. +Description: Test shift expressions as expressions in range expression (inclusive). Labels: range-expr, iterable-inclusive, DecimalNumber, int, shift-expr function init() { @@ -1818,7 +1823,7 @@ function init() { } Test-Case: output -Description: Test conditional expressions as expressions in range expression. +Description: Test conditional expressions as expressions in range expression (inclusive). Labels: range-expr, iterable-inclusive, conditional-expr, DecimalNumber, error, int, nil-literal, optional-type, union-type @@ -1834,7 +1839,7 @@ function init() { } Test-Case: output -Description: Test lang.int constants as expressions in range expression. +Description: Test lang.int constants as expressions in range expression (inclusive). Labels: range-expr, iterable-inclusive, int, int:SIGNED8_MAX_VALUE, int:UNSIGNED8_MAX_VALUE function init() { @@ -1847,7 +1852,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when values of expressions are positive integers +Description: Test range expression (inclusive) with iterable object when values of both expressions are positive integers. Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, object-type, record-type, optional-type function init() { @@ -1869,7 +1874,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when values of expressions are negative integers +Description: Test range expression (inclusive) with iterable object when values of both expressions are negative integers. Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, object-type, record-type, optional-type, unary-minus @@ -1892,7 +1897,8 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when values of expressions are integers +Description: Test range expression (inclusive) with iterable object when the value of one expression is a + negative integer and the value of the other expression is a positive integer. Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, object-type, record-type, optional-type, unary-minus @@ -1915,7 +1921,8 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when values of both expressions are integers +Description: Test range expression (inclusive) with iterable object when the value of one expression is a + negative integer and the value of the other expression is a positive integer. Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, object-type, record-type, optional-type, unary-minus @@ -1938,7 +1945,8 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when values of expressions are positive Signed8 integers +Description: Test range expression (inclusive) with iterable object when values of both expressions are positive + Signed8 integers. Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, int:Signed8, object-type, record-type, optional-type @@ -1961,7 +1969,8 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when values of expressions are negative Signed8 integers +Description: Test range expression (inclusive) with iterable object when values of both expressions are negative + Signed8 integers. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus @@ -1984,7 +1993,8 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when values of expressions are Signed8 integers +Description: Test range expression (inclusive) with iterable object when the value of one expression is a + negative Signed8 integer and the value of the other expression is a positive Signed8 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus @@ -2007,7 +2017,8 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when values of expressions are positive Signed16 integers +Description: Test range expression (inclusive) with iterable object when values of both expressions are positive + Signed16 integers. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, object-type, record-type, optional-type @@ -2030,7 +2041,8 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when values of expressions are negative Signed16 integers +Description: Test range expression (inclusive) with iterable object when values of both expressions are negative + Signed16 integers. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus @@ -2053,7 +2065,8 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when values of expressions are Signed16 integers +Description: Test range expression (inclusive) with iterable object when the value of one expression is a + negative Signed16 integer and the value of the other expression is a positive Signed16 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus @@ -2076,7 +2089,8 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when values of expressions are positive Signed32 integers +Description: Test range expression (inclusive) with iterable object when values of both expressions are positive + Signed32 integers. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, object-type, record-type, optional-type @@ -2099,7 +2113,8 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when values of expressions are negative Signed32 integers +Description: Test range expression (inclusive) with iterable object when values of both expressions are negative + Signed32 integers. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus @@ -2122,7 +2137,8 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when values of expressions are Signed32 integers +Description: Test range expression (inclusive) with iterable object when the value of one expression is a + negative Signed32 integer and the value of the other expression is a positive Signed32 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus @@ -2145,7 +2161,8 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when values of expressions are Unsigned8 integers +Description: Test range expression (inclusive) with iterable object when values of both expressions are + Unsigned8 integers. Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, additive-expr, object-type, record-type, optional-type @@ -2168,7 +2185,8 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when values of expressions are Unsigned16 integers +Description: Test range expression (inclusive) with iterable object when values of both expressions are + Unsigned16 integers. Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, additive-expr, object-type, record-type, optional-type, unary-minus @@ -2191,7 +2209,8 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when values of expressions are Unsigned32 integers +Description: Test range expression (inclusive) with iterable object when values of both expressions are + Unsigned32 integers. Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, additive-expr, object-type, record-type, optional-type, unary-minus @@ -2214,8 +2233,8 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a positive integer - and value of the second expression is a positive Signed8 integer. +Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive + integer and value of the second expression is a positive Signed8 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, additive-expr, object-type, record-type, optional-type @@ -2238,8 +2257,8 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a negative integer and value of the - second expression is a negative Signed8 integer. +Description: Test range expression (inclusive) with iterable object when value of the first expression is a + negative integer and value of the second expression is a negative Signed8 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus @@ -2262,8 +2281,8 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a negative integer and value of the - second expression is a positive Signed8 integer. +Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative + integer and value of the second expression is a positive Signed8 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus @@ -2286,8 +2305,8 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a positive integer and value of the - second expression is a positive Signed16 integer. +Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive + integer and value of the second expression is a positive Signed16 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, object-type, record-type, optional-type @@ -2310,8 +2329,8 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a negative integer and value of the - second expression is a negative Signed16 integer. +Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative + integer and value of the second expression is a negative Signed16 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus @@ -2334,8 +2353,8 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a negative integer and value of the - second expression is a positive Signed16 integer. +Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative + integer and value of the second expression is a positive Signed16 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus @@ -2358,8 +2377,8 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a positive integer and value of the - second expression is a positive Signed32 integer. +Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive + integer and value of the second expression is a positive Signed32 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, object-type, record-type, optional-type @@ -2382,8 +2401,8 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a negative integer - and value of the second expression is a negative Signed32 integer. +Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative + integer and value of the second expression is a negative Signed32 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus @@ -2406,8 +2425,8 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a negative integer and value of the - second expression is a positive Signed32 integer. +Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative + integer and value of the second expression is a positive Signed32 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus @@ -2430,8 +2449,8 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a positive integer and value of the - second expression is a Unsigned8 integer. +Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive + integer and value of the second expression is a Unsigned8 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, additive-expr, object-type, record-type, optional-type @@ -2454,8 +2473,8 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a negative integer and value of the - second expression is a Unsigned8 integer. +Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative + integer and value of the second expression is a Unsigned8 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, additive-expr, object-type, record-type, optional-type, unary-minus @@ -2478,8 +2497,8 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a positive integer and value of the - second expression is a byte. +Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive + integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 Labels: range-expr, iterable-object, int, DecimalNumber, byte, additive-expr, object-type, record-type, optional-type @@ -2502,7 +2521,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a negative integer +Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 Labels: range-expr, iterable-object, int, DecimalNumber, byte, additive-expr, object-type, record-type, @@ -2527,7 +2546,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a positive integer +Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive integer and value of the second expression is a Unsigned16 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, additive-expr, object-type, record-type, optional-type @@ -2551,7 +2570,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a negative integer +Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative integer and value of the second expression is a Unsigned16 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, additive-expr, object-type, record-type, optional-type, unary-minus @@ -2575,7 +2594,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a positive integer +Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive integer and value of the second expression is a Unsigned32 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, additive-expr, object-type, record-type, optional-type @@ -2599,7 +2618,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a negative integer +Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative integer and value of the second expression is a Unsigned32 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, additive-expr, object-type, record-type, optional-type, @@ -2624,7 +2643,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a positive Signed8 +Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed8 integer and value of the second expression is a positive integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, additive-expr, object-type, record-type, optional-type @@ -2648,7 +2667,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a negative Signed8 +Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a negative integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus @@ -2672,7 +2691,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a negative Signed8 +Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a positive integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus @@ -2696,7 +2715,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a positive Signed8 +Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed8 integer and value of the second expression is a positive Signed16 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Signed16, additive-expr, object-type, record-type, optional-type @@ -2720,7 +2739,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a negative Signed8 +Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a negative Signed16 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus @@ -2744,7 +2763,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a negative Signed8 +Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a positive Signed16 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus @@ -2768,7 +2787,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a positive Signed8 +Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed8 integer and value of the second expression is a positive Signed32 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Signed32, additive-expr, object-type, record-type, optional-type @@ -2793,7 +2812,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a negative Signed8 +Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a negative Signed32 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus @@ -2817,7 +2836,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a negative Signed8 +Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a positive Signed32 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus @@ -2841,7 +2860,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a positive Signed8 +Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed8 integer and value of the second expression is a Unsigned8 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Unsigned8, additive-expr, object-type, record-type, optional-type @@ -2866,7 +2885,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a negative Signed8 +Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a Unsigned8 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Unsigned8, additive-expr, object-type, record-type, optional-type, unary-minus @@ -2890,8 +2909,8 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a positive Signed8 integer - and value of the second expression is a byte. +Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed8 + integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, byte, additive-expr, object-type, record-type, optional-type @@ -2915,7 +2934,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a negative Signed8 +Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, byte, additive-expr, object-type, record-type, @@ -2940,7 +2959,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a positive Signed8 +Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed8 integer and value of the second expression is a Unsigned16 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Unsigned16, additive-expr, object-type, record-type, optional-type @@ -2964,7 +2983,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a negative Signed8 +Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a Unsigned16 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Unsigned16, additive-expr, object-type, record-type, optional-type, unary-minus @@ -2988,7 +3007,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a positive Signed8 +Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed8 integer and value of the second expression is a Unsigned32 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Unsigned32, additive-expr, object-type, record-type, optional-type @@ -3012,7 +3031,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a negative Signed8 +Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a Unsigned32 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Unsigned32, additive-expr, object-type, record-type, optional-type, unary-minus @@ -3036,7 +3055,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a positive Signed16 +Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed16 integer and value of the second expression is a positive integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, object-type, record-type, optional-type @@ -3060,7 +3079,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a negative Signed16 +Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a negative integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus @@ -3084,7 +3103,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a negative Signed16 +Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a positive integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus @@ -3108,7 +3127,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a positive Signed16 +Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed16 integer and value of the second expression is a positive Signed8 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Signed8, additive-expr, object-type, record-type, optional-type @@ -3132,7 +3151,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a negative Signed16 +Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a negative Signed8 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus @@ -3156,7 +3175,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a negative Signed16 +Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a positive Signed8 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus @@ -3180,7 +3199,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a positive Signed16 +Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed16 integer and value of the second expression is a positive Signed32 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Signed32, additive-expr, object-type, record-type, optional-type @@ -3204,7 +3223,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a negative Signed16 +Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a negative Signed32 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus @@ -3228,7 +3247,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a negative Signed16 +Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a positive Signed32 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus @@ -3252,7 +3271,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a positive Signed16 +Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed16 integer and value of the second expression is a Unsigned8 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Unsigned8, additive-expr, object-type, record-type, optional-type @@ -3276,7 +3295,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a negative Signed16 +Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a Unsigned8 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Unsigned8, additive-expr, object-type, record-type, optional-type, unary-minus @@ -3300,7 +3319,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a positive Signed16 +Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed16 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, byte, additive-expr, object-type, record-type, @@ -3325,7 +3344,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a negative Signed16 +Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, byte, additive-expr, object-type, record-type, @@ -3350,7 +3369,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a positive Signed16 +Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed16 integer and value of the second expression is a Unsigned16 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Unsigned16, additive-expr, object-type, record-type, optional-type @@ -3374,7 +3393,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a negative Signed16 +Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a Unsigned16 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Unsigned16, additive-expr, object-type, record-type, optional-type, unary-minus @@ -3398,7 +3417,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a positive Signed16 +Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed16 integer and value of the second expression is a Unsigned32 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Unsigned32, additive-expr, object-type, record-type, optional-type @@ -3422,7 +3441,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a negative Signed16 +Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a Unsigned32 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Unsigned32, additive-expr, object-type, record-type, optional-type, unary-minus @@ -3446,7 +3465,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a positive Signed32 +Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed32 integer and value of the second expression is a positive integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, object-type, record-type, optional-type @@ -3470,7 +3489,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a negative Signed32 +Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a negative integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus @@ -3494,7 +3513,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a negative Signed32 +Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a positive integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus @@ -3518,7 +3537,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a positive Signed32 +Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed32 integer and value of the second expression is a positive Signed8 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Signed8, additive-expr, object-type, record-type, optional-type @@ -3542,7 +3561,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a negative Signed32 +Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a negative Signed8 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus @@ -3566,7 +3585,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a negative Signed32 +Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a positive Signed8 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus @@ -3590,7 +3609,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a positive Signed32 +Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed32 integer and value of the second expression is a positive Signed16 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Signed16, additive-expr, object-type, record-type, optional-type @@ -3614,7 +3633,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a negative Signed32 +Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a negative Signed16 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus @@ -3638,7 +3657,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a negative Signed32 +Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a positive Signed16 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus @@ -3662,7 +3681,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a positive Signed32 +Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed32 integer and value of the second expression is a Unsigned8 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Unsigned8, additive-expr, object-type, record-type, optional-type @@ -3686,7 +3705,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a negative Signed32 +Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a Unsigned8 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Unsigned8, additive-expr, object-type, record-type, optional-type, unary-minus @@ -3710,7 +3729,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a positive Signed32 +Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed32 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, bye, additive-expr, object-type, record-type, @@ -3735,7 +3754,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a negative Signed32 +Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, byte, additive-expr, object-type, record-type, @@ -3760,7 +3779,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a positive Signed32 +Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed32 integer and value of the second expression is a Unsigned16 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Unsigned16, additive-expr, object-type, record-type, optional-type @@ -3784,7 +3803,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a negative Signed32 +Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a Unsigned16 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Unsigned16, additive-expr, object-type, record-type, optional-type, unary-minus @@ -3808,7 +3827,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a positive Signed32 +Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed32 integer and value of the second expression is a Unsigned32 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Unsigned32, additive-expr, object-type, record-type, optional-type @@ -3832,7 +3851,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a negative Signed32 +Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a Unsigned32 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Unsigned32, additive-expr, object-type, record-type, optional-type, unary-minus @@ -3856,7 +3875,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a Unsigned8 +Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned8 integer and value of the second expression is a positive integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, additive-expr, object-type, record-type, optional-type @@ -3880,7 +3899,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a Unsigned8 +Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned8 integer and value of the second expression is a positive Signed8 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, int:Signed8, additive-expr, object-type, record-type, optional-type @@ -3905,7 +3924,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a Unsigned8 +Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned8 integer and value of the second expression is a positive Signed16 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, int:Signed16, additive-expr, object-type, record-type, optional-type @@ -3929,7 +3948,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a Unsigned8 +Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned8 integer and value of the second expression is a positive Signed32 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, int:Signed32, additive-expr, object-type, record-type, optional-type @@ -3953,7 +3972,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a Unsigned8 +Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned8 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, byte, additive-expr, object-type, record-type, @@ -3978,7 +3997,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a Unsigned8 +Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned8 integer and value of the second expression is a Unsigned16 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, int:Unsigned16, additive-expr, object-type, record-type, optional-type @@ -4002,7 +4021,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a Unsigned8 +Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned8 integer and value of the second expression is a Unsigned32 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, int:Unsigned32, additive-expr, object-type, record-type, optional-type @@ -4027,7 +4046,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a Unsigned16 +Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned16 integer and value of the second expression is a positive integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, additive-expr, object-type, record-type, optional-type @@ -4051,7 +4070,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a Unsigned16 +Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned16 integer and value of the second expression is a positive Signed8 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, int:Signed8, additive-expr, object-type, record-type, optional-type @@ -4075,7 +4094,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a Unsigned16 +Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned16 integer and value of the second expression is a positive Signed16 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, int:Signed16, additive-expr, object-type, record-type, optional-type @@ -4099,7 +4118,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a Unsigned16 +Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned16 integer and value of the second expression is a positive Signed32 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, int:Signed32, additive-expr, object-type, record-type, optional-type @@ -4123,7 +4142,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a Unsigned16 +Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned16 integer and value of the second expression is a Unsigned8 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, int:Unsigned8, additive-expr, object-type, record-type, optional-type @@ -4148,7 +4167,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a Unsigned16 integer +Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned16 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, byte, additive-expr, object-type, record-type, @@ -4173,7 +4192,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a Unsigned16 +Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned16 integer and value of the second expression is a Unsigned32 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, int:Unsigned32, additive-expr, object-type, record-type, optional-type @@ -4197,7 +4216,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a Unsigned32 +Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned32 integer and value of the second expression is a positive integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, additive-expr, object-type, record-type, optional-type @@ -4221,7 +4240,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a Unsigned32 +Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned32 integer and value of the second expression is a positive Signed8 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, int:Signed8, additive-expr, object-type, record-type, optional-type @@ -4245,7 +4264,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a Unsigned32 +Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned32 integer and value of the second expression is a positive Signed16 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, int:Signed16, additive-expr, object-type, record-type, optional-type @@ -4269,7 +4288,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a Unsigned32 +Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned32 integer and value of the second expression is a positive Signed32 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, int:Signed32, additive-expr, object-type, record-type, optional-type @@ -4293,7 +4312,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a Unsigned32 +Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned32 integer and value of the second expression is a Unsigned8 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, int:Unsigned8, additive-expr, object-type, record-type, optional-type @@ -4317,7 +4336,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a Unsigned32 +Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned32 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, byte, additive-expr, object-type, record-type, @@ -4342,7 +4361,7 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when value of the first expression is a Unsigned32 +Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned32 integer and value of the second expression is a Unsigned16 integer. Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, int:Unsigned16, additive-expr, object-type, record-type, optional-type @@ -4366,7 +4385,8 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when values of expressions are of user-defined subtypes of int. +Description: Test range expression (inclusive) with iterable object when values of both expressions are of + user-defined subtypes of int. Fail-Issue: ballerina-platform/ballerina-lang#33139 Labels: range-expr, iterable-object, int, DecimalNumber, singleton-type, union-type, module-type-decl, additive-expr, object-type, record-type, optional-type @@ -4392,7 +4412,8 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when values of expressions are of union of int subtypes. +Description: Test range expression (inclusive) with iterable object when values of both expressions are of + union of int subtypes. Fail-Issue: ballerina-platform/ballerina-lang#33139 Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Unsigned32, union-type, additive-expr, object-type, record-type, optional-type @@ -4416,8 +4437,8 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when the value of the first expression and the value of the - second expression is equal. +Description: Test range expression (inclusive) with iterable object when the value of the first expression and the + value of the second expression is equal. Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, object-type, record-type, optional-type function init() { @@ -4439,7 +4460,7 @@ function init() { } Test-Case: output -Description: Test range expression when the value of the first expression is less than the +Description: Test range expression (inclusive) when the value of the first expression is less than the value of the second expression. Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, object-type, record-type, optional-type @@ -4462,7 +4483,8 @@ function init() { } Test-Case: output -Description: Test range expression with iterable object when the types of the values of the expressions are inferred. +Description: Test range expression (inclusive) with iterable object when the types of the values of the expressions + are inferred. Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, object-type, record-type, optional-type, var function init() { @@ -4484,7 +4506,7 @@ function init() { } Test-Case: output -Description: Test range expression when the types of the values of the expressions and type of the range +Description: Test range expression (inclusive) when the types of the values of the expressions and type of the range expression are inferred. Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, var @@ -4502,7 +4524,7 @@ function init() { } Test-Case: output -Description: Test range expression at module level. +Description: Test range expression (inclusive) at module level. Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, object-type, record-type, optional-type, var int startIndex = 1; @@ -4525,7 +4547,7 @@ function init() { } Test-Case: output -Description: Test range expression at module level. +Description: Test range expression (inclusive) at module level. Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, var int startIndex = 1; @@ -4543,7 +4565,7 @@ function init() { } Test-Case: output -Description: Test iterable object returned by the range expression. +Description: Test iterable object returned by the range expression (inclusive). Labels: range-expr, int, DecimalNumber, object-type, optional-type, var, value:toBalString, method-call-expr function init() { @@ -4573,7 +4595,7 @@ function init() { } Test-Case: output -Description: Test field and member access as expressions in range expression. +Description: Test field and member access as expressions in range expression (inclusive). Labels: range-expr, iterable-object, additive-expr, array-type, DecimalNumber, field-access-expr, int, list-constructor, mapping-constructor, member-access-expr, module-type-defn, object-type, record-type, optional-type @@ -4600,7 +4622,7 @@ function init() { } Test-Case: output -Description: Test function and method call as expressions in range expression. +Description: Test function and method call as expressions in range expression (inclusive). Labels: range-expr, iterable-object, DecimalNumber, int, explicit-new-expr, function-call-expr module-class-defn, method-call-expr, additive-expr, object-type, record-type, optional-type @@ -4632,7 +4654,7 @@ function getInt() returns int { } Test-Case: output -Description: Test type cast expression as expressions in range expression. +Description: Test type cast expression as expressions in range expression (inclusive). Labels: range-expr, iterable-object, DecimalNumber, int, type-cast-expr, additive-expr, object-type, record-type, optional-type @@ -4653,7 +4675,7 @@ function init() { } Test-Case: output -Description: Test unary expressions as expressions in range expression. +Description: Test unary expressions as expressions in range expression (inclusive). Labels: range-expr, iterable-object, DecimalNumber, int, unary-complement, unary-minus, unary-plus, additive-expr, object-type, record-type, optional-type @@ -4682,7 +4704,7 @@ function init() { } Test-Case: output -Description: Test additive expression as expressions in range expression. +Description: Test additive expression as expressions in range expression (inclusive). Labels: range-expr, iterable-object, additive-expr, int, DecimalNumber, object-type, record-type, optional-type function init() { @@ -4702,7 +4724,7 @@ function init() { } Test-Case: output -Description: Test multiplicative expressions as expressions in range expression. +Description: Test multiplicative expressions as expressions in range expression (inclusive). Labels: range-expr, iterable-object, additive-expr, DecimalNumber, int, multiplicative-expr, object-type, record-type, optional-type @@ -4731,7 +4753,7 @@ function init() { } Test-Case: output -Description: Test binary bitwise expressions as expressions in range expression. +Description: Test binary bitwise expressions as expressions in range expression (inclusive). Labels: range-expr, iterable-object, binary-bitwise-expr, DecimalNumber, int, additive-expr, object-type, record-type, optional-type @@ -4760,7 +4782,7 @@ function init() { } Test-Case: output -Description: Test checking expressions as expressions in range expression. +Description: Test checking expressions as expressions in range expression (inclusive). Labels: range-expr, iterable-object, check, checkpanic, DecimalNumber, error, int, union-type, additive-expr, object-type, record-type, optional-type @@ -4783,7 +4805,7 @@ function init() returns error? { } Test-Case: output -Description: Test let expression as expressions in range expression. +Description: Test let expression as expressions in range expression (inclusive). Labels: range-expr, iterable-object, DecimalNumber, int, let-expr, additive-expr, object-type, record-type, optional-type function init() { @@ -4803,7 +4825,7 @@ function init() { } Test-Case: output -Description: Test shift expressions as expressions in range expression. +Description: Test shift expressions as expressions in range expression (inclusive). Labels: range-expr, iterable-object, DecimalNumber, int, shift-expr, additive-expr, object-type, record-type, optional-type @@ -4824,7 +4846,7 @@ function init() { } Test-Case: output -Description: Test conditional expressions as expressions in range expression. +Description: Test conditional expressions as expressions in range expression (inclusive). Labels: range-expr, iterable-object, conditional-expr, additive-expr, DecimalNumber, error, int, nil-literal, optional-type, union-type, object-type, record-type @@ -4847,7 +4869,7 @@ function init() { } Test-Case: output -Description: Test lang.int constants as expressions in range expression. +Description: Test lang.int constants as expressions in range expression (inclusive). Labels: range-expr, iterable-object, int, int:SIGNED8_MAX_VALUE, int:UNSIGNED8_MAX_VALUE, additive-expr, object-type, record-type, optional-type @@ -4868,7 +4890,7 @@ function init() { } Test-Case: output -Description: Test isolatedness of range expression. +Description: Test isolatedness of range expression (inclusive). Fail-Issue: ballerina-platform/ballerina-lang#33163 Labels: range-expr, iterable-object, object-type, additive-expr, int, DecimalNumber, function-call-expr, record-type, optional-type, lock-stmt @@ -4895,7 +4917,7 @@ function getRange() returns object { } Test-Case: output -Description: Test isolatedness of range expression. +Description: Test isolatedness of range expression (inclusive). Fail-Issue: ballerina-platform/ballerina-lang#33163 Labels: range-expr, object-type, record-type, int, optional-type, is-expr, any, type-cast-expr @@ -4911,7 +4933,7 @@ function init() { } Test-Case: output -Description: Test isolatedness of range expression. +Description: Test isolatedness of range expression (inclusive). Fail-Issue: ballerina-platform/ballerina-lang#33163 Labels: range-expr, object-type, int, DecimalNumber, record-type, optional-type, is-expr, method-call-expr @@ -4928,7 +4950,7 @@ function init() { } Test-Case: output -Description: Test range expression with query expression. +Description: Test range expression (inclusive) with query expression. Labels: range-expr, iterable-inclusive, array-type, int, DecimalNumber, query-expr function init() { @@ -4939,7 +4961,7 @@ function init() { } Test-Case: error -Description: Test range expression when static type of either of the expression is not a subtype of int. +Description: Test range expression (inclusive) when static type of either of the expression is not a subtype of int. Labels: range-expr, int, DecimalFloatingPointNumber, string function init() { @@ -4953,7 +4975,7 @@ function init() { } Test-Case: error -Description: Test assigning the result of range expression to an incompatible type. +Description: Test assigning the result of range expression (inclusive) to an incompatible type. Labels: range-expr, int, DecimalNumber, object-type, record-type, optional-type function init() { @@ -4967,7 +4989,7 @@ function init() { } Test-Case: error -Description: Test assigning the result of range expression to an incompatible type when the static +Description: Test assigning the result of range expression (inclusive) to an incompatible type when the static type of the range expression is inferred. Labels: range-expr, int, DecimalNumber, object-type, var, record-type, float, optional-type @@ -4984,7 +5006,7 @@ function init() { } Test-Case: parser-error -Description: Test range expression syntax errors +Description: Test range expression (inclusive) syntax errors. Labels: range-expr, DecimalNumber function init() { From 2faa350b82ea2a5f64992dbefab925fa4e3b9eaa Mon Sep 17 00:00:00 2001 From: lasinicl Date: Sun, 17 Oct 2021 13:00:47 +0530 Subject: [PATCH 04/14] Improve tests --- .../range-expr/range_expr_exclusive.balt | 2134 ++++++++++++----- .../range-expr/range_expr_inclusive.balt | 1705 +++++++++---- 2 files changed, 2798 insertions(+), 1041 deletions(-) diff --git a/conformance/lang/expressions/range-expr/range_expr_exclusive.balt b/conformance/lang/expressions/range-expr/range_expr_exclusive.balt index ff401f26..4d966ccc 100644 --- a/conformance/lang/expressions/range-expr/range_expr_exclusive.balt +++ b/conformance/lang/expressions/range-expr/range_expr_exclusive.balt @@ -1,44 +1,56 @@ Test-Case: output Description: Test range expression (exclusive) when values of both expressions are positive integers. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + additive-expr function init() { int startIndex = 0; int endIndex = 6; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 6 + io:println(arr); // @output [0,1,2,3,4,5] } Test-Case: output Description: Test range expression (exclusive) when values of both expressions are negative integers. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + unary-minus, additive-expr function init() { int startIndex = -6; int endIndex = -1; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 5 + io:println(arr); // @output [-6,-5,-4,-3,-2] } Test-Case: output Description: Test range expression (exclusive) when the value of one expression is a negative integer and the value of the other expression is a positive integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + unary-minus, additive-expr function init() { int startIndex = -10; int endIndex = 20; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 30 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19] } Test-Case: output @@ -51,1533 +63,1936 @@ function init() { int endIndex = 964732; int count = 0; foreach int i in startIndex ..< endIndex { - count = count + 1; + count = count + i; } - io:println(count); // @output 8600047 + io:println(count); // @output -28683667958724 } Test-Case: output Description: Test range expression (exclusive) when values of both expressions are positive Signed8 integers. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, int:Signed8, additive-expr function init() { int:Signed8 startIndex = 1; int:Signed8 endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count += 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) when values of both expressions are negative Signed8 integers. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, unary-minus, additive-expr function init() { int:Signed8 startIndex = -10; int:Signed8 endIndex = -1; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2] } Test-Case: output Description: Test range expression (exclusive) when the value of one expression is a negative Signed8 integer and the value of the other expression is a positive Signed8 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, unary-minus, additive-expr function init() { int:Signed8 startIndex = -10; int:Signed8 endIndex = 20; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 30 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19] } Test-Case: output Description: Test range expression (exclusive) when values of both expressions are positive Signed16 integers. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, additive-expr function init() { int:Signed16 startIndex = 1; int:Signed16 endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) when values of both expressions are negative Signed16 integers. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, unary-minus, additive-expr function init() { int:Signed16 startIndex = -10; int:Signed16 endIndex = -1; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2] } Test-Case: output Description: Test range expression (exclusive) when the value of one expression is a negative Signed16 integer and the value of the other expression is a positive Signed16 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, unary-minus, additive-expr function init() { int:Signed16 startIndex = -10; int:Signed16 endIndex = 20; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 30 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19] } Test-Case: output Description: Test range expression (exclusive) when values of both expressions are positive Signed32 integers. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed32, additive-expr function init() { int:Signed32 startIndex = 1; int:Signed32 endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) when values of both expressions are negative Signed32 integers. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed32, unary-minus, additive-expr function init() { int:Signed32 startIndex = -10; int:Signed32 endIndex = -1; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2] } Test-Case: output Description: Test range expression (exclusive) when the value of one expression is a negative Signed32 integer and the value of the other expression is a positive Signed32 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed32, unary-minus, additive-expr function init() { int:Signed32 startIndex = -10; int:Signed32 endIndex = 20; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 30 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19] } Test-Case: output Description: Test range expression (exclusive) when values of both expressions are Unsigned8 integers. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned8, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned8, additive-expr function init() { int:Unsigned8 startIndex = 1; int:Unsigned8 endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) when values of both expressions are Unsigned16 integers. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned16, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned16, additive-expr function init() { int:Unsigned16 startIndex = 1; int:Unsigned16 endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) when values of both expressions are Unsigned32 integers. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned32, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned32, additive-expr function init() { int:Unsigned32 startIndex = 1; int:Unsigned32 endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, additive-expr function init() { int startIndex = 1; int:Signed8 endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative integer and value of the second expression is a negative Signed8 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, unary-minus, additive-expr function init() { int startIndex = -10; int:Signed8 endIndex = -1; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, unary-minus, additive-expr function init() { int startIndex = -10; int:Signed8 endIndex = 2; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 12 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, additive-expr function init() { int startIndex = 1; int:Signed16 endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative integer and value of the second expression is a negative Signed16 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, unary-minus, additive-expr function init() { int startIndex = -10; int:Signed16 endIndex = -1; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, unary-minus, additive-expr function init() { int startIndex = -10; int:Signed16 endIndex = 2; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 12 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed32, additive-expr function init() { int startIndex = 1; int:Signed32 endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative integer and value of the second expression is a negative Signed32 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed32, unary-minus, additive-expr function init() { int startIndex = -10; int:Signed32 endIndex = -1; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed32, unary-minus, additive-expr function init() { int startIndex = -10; int:Signed32 endIndex = 2; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 12 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned8, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned8, additive-expr function init() { int startIndex = 1; int:Unsigned8 endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned8, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned8, unary-minus, additive-expr function init() { int startIndex = -10; int:Unsigned8 endIndex = 2; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 12 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-exclusive, int, DecimalNumber, byte, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + byte, additive-expr function init() { int startIndex = 1; byte endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-exclusive, int, DecimalNumber, byte, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + byte, unary-minus, additive-expr function init() { int startIndex = -10; byte endIndex = 2; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 12 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned16, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned16, additive-expr function init() { int startIndex = 1; int:Unsigned16 endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned16, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned16, unary-minus, additive-expr function init() { int startIndex = -10; int:Unsigned16 endIndex = 2; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 12 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned32, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned32, additive-expr function init() { int startIndex = 1; int:Unsigned32 endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned32, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned32, unary-minus, additive-expr function init() { int startIndex = -10; int:Unsigned32 endIndex = 2; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 12 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive Signed8 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, additive-expr function init() { int:Signed8 startIndex = 1; int endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a negative integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, unary-minus, additive-expr function init() { int:Signed8 startIndex = -10; int endIndex = -1; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, unary-minus, additive-expr function init() { int:Signed8 startIndex = -10; int endIndex = 2; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 12 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive Signed8 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Signed16, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, int:Signed16, additive-expr function init() { int:Signed8 startIndex = 1; int:Signed16 endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a negative Signed16 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Signed16, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, int:Signed16, unary-minus, additive-expr function init() { int:Signed8 startIndex = -10; int:Signed16 endIndex = -1; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Signed16, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, int:Signed16, unary-minus, additive-expr function init() { int:Signed8 startIndex = -10; int:Signed16 endIndex = 2; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 12 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive Signed8 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Signed32, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, int:Signed32, additive-expr function init() { int:Signed8 startIndex = 1; int:Signed32 endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a negative Signed32 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Signed32, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, int:Signed32, unary-minus, additive-expr function init() { int:Signed8 startIndex = -10; int:Signed32 endIndex = -1; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Signed32, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, int:Signed32, unary-minus, additive-expr function init() { int:Signed8 startIndex = -10; int:Signed32 endIndex = 2; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 12 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive Signed8 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Unsigned8, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, int:Unsigned8, additive-expr function init() { int:Signed8 startIndex = 1; int:Unsigned8 endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Unsigned8, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, int:Unsigned8, unary-minus, additive-expr function init() { int:Signed8 startIndex = -10; int:Unsigned8 endIndex = 2; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 12 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive Signed8 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, byte, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, byte, additive-expr function init() { int:Signed8 startIndex = 1; byte endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, byte, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, byte, unary-minus, additive-expr function init() { int:Signed8 startIndex = -10; byte endIndex = 2; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 12 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive Signed8 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Unsigned16, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, int:Unsigned16, additive-expr function init() { int:Signed8 startIndex = 1; int:Unsigned16 endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Unsigned16, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, int:Unsigned16, unary-minus, additive-expr function init() { int:Signed8 startIndex = -10; int:Unsigned16 endIndex = 2; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 12 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive Signed8 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Unsigned32, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, int:Unsigned32, additive-expr function init() { int:Signed8 startIndex = 1; int:Unsigned32 endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Unsigned32, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, int:Unsigned32, unary-minus, additive-expr function init() { int:Signed8 startIndex = -10; int:Unsigned32 endIndex = 2; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 12 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive Signed16 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, additive-expr function init() { int:Signed16 startIndex = 1; int endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a negative integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, unary-minus, additive-expr function init() { int:Signed16 startIndex = -10; int endIndex = -1; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, unary-minus, additive-expr function init() { int:Signed16 startIndex = -10; int endIndex = 2; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 12 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive Signed16 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Signed16, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, int:Signed16, additive-expr function init() { int:Signed16 startIndex = 1; int:Signed8 endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a negative Signed8 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Signed16, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, int:Signed16, unary-minus, additive-expr function init() { int:Signed16 startIndex = -10; int:Signed8 endIndex = -1; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Signed16, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, int:Signed16, unary-minus, additive-expr function init() { int:Signed16 startIndex = -10; int:Signed8 endIndex = 2; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 12 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive Signed16 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, int:Signed32, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, int:Signed32, additive-expr function init() { int:Signed16 startIndex = 1; int:Signed32 endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a negative Signed32 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, int:Signed32, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, int:Signed32, unary-minus, additive-expr function init() { int:Signed16 startIndex = -10; int:Signed32 endIndex = -1; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, int:Signed32, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, int:Signed32, unary-minus, additive-expr function init() { int:Signed16 startIndex = -10; int:Signed32 endIndex = 2; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 12 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive Signed16 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, int:Unsigned8, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, int:Unsigned8, additive-expr function init() { int:Signed16 startIndex = 1; int:Unsigned8 endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, int:Unsigned8, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, int:Unsigned8, unary-minus, additive-expr function init() { int:Signed16 startIndex = -10; int:Unsigned8 endIndex = 2; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 12 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive Signed16 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, byte, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, byte, additive-expr function init() { int:Signed16 startIndex = 1; byte endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, byte, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, byte, unary-minus, additive-expr function init() { int:Signed16 startIndex = -10; byte endIndex = 2; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 12 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive Signed16 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, int:Unsigned16, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, int:Unsigned16, additive-expr function init() { int:Signed16 startIndex = 1; int:Unsigned16 endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, int:Unsigned16, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, int:Unsigned16, unary-minus, additive-expr function init() { int:Signed16 startIndex = -10; int:Unsigned16 endIndex = 2; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 12 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive Signed16 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, int:Unsigned32, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, int:Unsigned32, additive-expr function init() { int:Signed16 startIndex = 1; int:Unsigned32 endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, int:Unsigned32, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, int:Unsigned32, unary-minus, additive-expr function init() { int:Signed16 startIndex = -10; int:Unsigned32 endIndex = 2; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 12 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive Signed32 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed32, additive-expr function init() { int:Signed32 startIndex = 1; int endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a negative integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed32, unary-minus, additive-expr function init() { int:Signed32 startIndex = -10; int endIndex = -1; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed32, unary-minus, additive-expr function init() { int:Signed32 startIndex = -10; int endIndex = 2; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 12 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive Signed32 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Signed32, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, int:Signed32, additive-expr function init() { int:Signed32 startIndex = 1; int:Signed8 endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a negative Signed8 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Signed32, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, int:Signed32, unary-minus, additive-expr function init() { int:Signed32 startIndex = -10; int:Signed8 endIndex = -1; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Signed32, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, int:Signed32, unary-minus, additive-expr function init() { int:Signed32 startIndex = -10; int:Signed8 endIndex = 2; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 12 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive Signed32 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, int:Signed32, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, int:Signed32, additive-expr function init() { int:Signed32 startIndex = 1; int:Signed16 endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a negative Signed16 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, int:Signed32, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, int:Signed32, unary-minus, additive-expr function init() { int:Signed32 startIndex = -10; int:Signed16 endIndex = -1; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, int:Signed32, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, int:Signed32, unary-minus, additive-expr function init() { int:Signed32 startIndex = -10; int:Signed16 endIndex = 2; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 12 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive Signed32 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, int:Unsigned8, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed32, int:Unsigned8, additive-expr function init() { int:Signed32 startIndex = 1; int:Unsigned8 endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, int:Unsigned8, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed32, int:Unsigned8, unary-minus, additive-expr function init() { int:Signed32 startIndex = -10; int:Unsigned8 endIndex = 2; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 12 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive Signed32 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, byte, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed32, byte, additive-expr function init() { int:Signed32 startIndex = 1; byte endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, byte, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed32, byte, unary-minus, additive-expr function init() { int:Signed32 startIndex = -10; byte endIndex = 2; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 12 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive Signed32 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, int:Unsigned16, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed32, int:Unsigned16, additive-expr function init() { int:Signed32 startIndex = 1; int:Unsigned16 endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, int:Unsigned16, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed32, int:Unsigned16, unary-minus, additive-expr function init() { int:Signed32 startIndex = -10; int:Unsigned16 endIndex = 2; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 12 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive Signed32 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, int:Unsigned32, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed32, int:Unsigned32, additive-expr function init() { int:Signed32 startIndex = 1; int:Unsigned32 endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, int:Unsigned32, unary-minus, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed32, int:Unsigned32, unary-minus, additive-expr function init() { int:Signed32 startIndex = -10; int:Unsigned32 endIndex = 2; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 12 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a Unsigned8 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned8, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned8, additive-expr function init() { int:Unsigned8 startIndex = 1; int endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a Unsigned8 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Unsigned8, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, int:Unsigned8, additive-expr function init() { int:Unsigned8 startIndex = 1; int:Signed8 endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a Unsigned8 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, int:Unsigned8, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, int:Unsigned8, additive-expr function init() { int:Unsigned8 startIndex = 1; int:Signed16 endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a Unsigned8 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, int:Unsigned8, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed32, int:Unsigned8, additive-expr function init() { int:Unsigned8 startIndex = 1; int:Signed32 endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a Unsigned8 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned8, byte, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned8, byte, additive-expr function init() { int:Unsigned8 startIndex = 1; byte endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a Unsigned8 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned8, int:Unsigned16, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned8, int:Unsigned16, additive-expr function init() { int:Unsigned8 startIndex = 1; int:Unsigned16 endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a Unsigned8 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned8, int:Unsigned32, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned8, int:Unsigned32, additive-expr function init() { int:Unsigned8 startIndex = 1; int:Unsigned32 endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a Unsigned16 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned16, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned16, additive-expr function init() { int:Unsigned16 startIndex = 1; int endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a Unsigned16 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Unsigned16, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, int:Unsigned16, additive-expr function init() { int:Unsigned16 startIndex = 1; int:Signed8 endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a Unsigned16 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, int:Unsigned16, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, int:Unsigned16, additive-expr function init() { int:Unsigned16 startIndex = 1; int:Signed16 endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a Unsigned16 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, int:Unsigned16, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed32, int:Unsigned16, additive-expr function init() { int:Unsigned16 startIndex = 1; int:Signed32 endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a Unsigned16 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned8, int:Unsigned16, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned8, int:Unsigned16, additive-expr function init() { int:Unsigned16 startIndex = 1; int:Unsigned8 endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a Unsigned16 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned16, byte, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned16, byte, additive-expr function init() { int:Unsigned16 startIndex = 1; byte endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a Unsigned16 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned16, int:Unsigned32, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned16, int:Unsigned32, additive-expr function init() { int:Unsigned16 startIndex = 1; int:Unsigned32 endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a Unsigned32 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned32, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned32, additive-expr function init() { int:Unsigned32 startIndex = 1; int endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a Unsigned32 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Unsigned32, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, int:Unsigned32, additive-expr function init() { int:Unsigned32 startIndex = 1; int:Signed8 endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a Unsigned32 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed16, int:Unsigned32, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, int:Unsigned32, additive-expr function init() { int:Unsigned32 startIndex = 1; int:Signed16 endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a Unsigned32 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed32, int:Unsigned32, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed32, int:Unsigned32, additive-expr function init() { int:Unsigned32 startIndex = 1; int:Signed32 endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a Unsigned32 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned8, int:Unsigned32, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned8, int:Unsigned32, additive-expr function init() { int:Unsigned32 startIndex = 1; int:Unsigned8 endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a Unsigned32 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned32, byte, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned32, byte, additive-expr function init() { int:Unsigned32 startIndex = 1; byte endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a Unsigned32 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Unsigned16, int:Unsigned32, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned16, int:Unsigned32, additive-expr function init() { int:Unsigned32 startIndex = 1; int:Unsigned16 endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) when values of both expressions are of user-defined subtypes of int. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-exclusive, int, DecimalNumber, singleton-type, union-type, module-type-decl, - additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + singleton-type, union-type, module-type-decl, additive-expr type Ints 1|10; @@ -1585,78 +2000,95 @@ function init() { Ints startIndex = 1; Ints endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) when values of both expressions are of union of int subtypes. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-exclusive, int, DecimalNumber, int:Signed8, int:Unsigned32, union-type, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, int:Unsigned32, union-type, additive-expr function init() { int:Signed8|int:Unsigned32 startIndex = 1; int:Signed8|int:Unsigned32 endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) when the value of the first expression and the value of the second expression is equal. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, additive-expr function init() { int startIndex = 5; int endIndex = 5; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 0 + io:println(arr); // @output [] } Test-Case: output Description: Test range expression (exclusive) when the value of the first expression is less than the value of the second expression. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, additive-expr function init() { int startIndex = 5; int endIndex = 3; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 0 + io:println(arr); // @output [] } Test-Case: output Description: Test range expression (exclusive) when the types expressions are inferred. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, additive-expr, var +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + additive-expr, var function init() { var startIndex = 1; var endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ..< endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test field and member access as expressions in range expression (exclusive). -Labels: range-expr, iterable-exclusive, array-type, DecimalNumber, field-access-expr, int, list-constructor, - mapping-constructor, member-access-expr, module-type-defn, record-type +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, field-access-expr, + DecimalNumber, int, mapping-constructor-expr, module-type-defn, record-type, additive-expr type Record record { int x; @@ -1666,17 +2098,20 @@ function init() { Record c = {x: 10}; int[] d = [30, 40]; int count = 0; + int[] arr = []; foreach int i in c.x ..< d[0] { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 20 + io:println(arr); // @output [10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29] } Test-Case: output Description: Test function and method call as expressions in range expression (exclusive). -Labels: range-expr, iterable-exclusive, DecimalNumber, int, explicit-new-expr, function-call-expr - module-class-defn, method-call-expr +Labels: range-expr, iterable-exclusive, DecimalNumber, array-type, list-constructor-expr, member-access-expr, + int, explicit-new-expr, function-call-expr, module-class-defn, method-call-expr, additive-expr class Class { function getInt() returns int { @@ -1687,11 +2122,14 @@ class Class { function init() { Class cls = new Class(); int count = 0; + int[] arr = []; foreach int i in cls.getInt() ..< getInt() { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } function getInt() returns int { @@ -1700,100 +2138,133 @@ function getInt() returns int { Test-Case: output Description: Test type cast expression as expressions in range expression (exclusive). -Labels: range-expr, iterable-exclusive, DecimalNumber, int, type-cast-expr +Labels: range-expr, iterable-exclusive, DecimalNumber, array-type, list-constructor-expr, member-access-expr, + int, type-cast-expr, additive-expr function init() { int count = 0; + int[] arr = []; foreach int i in 1.0 ..< 10.0 { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test unary expressions as expressions in range expression (exclusive). -Labels: range-expr, iterable-exclusive, DecimalNumber, int, unary-complement, unary-minus, unary-plus +Labels: range-expr, iterable-exclusive, DecimalNumber, array-type, list-constructor-expr, member-access-expr, int, + unary-complement, unary-minus, unary-plus, additive-expr function init() { int count = 0; + int[] arr = []; foreach int i in -10 ..< +2 { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 12 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1] count = 0; + arr = []; foreach int i in -10 ..< ~2 { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 7 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4] } Test-Case: output Description: Test additive expression as expressions in range expression (exclusive). -Labels: range-expr, iterable-exclusive, additive-expr, int, DecimalNumber +Labels: range-expr, iterable-exclusive, additive-expr, array-type, list-constructor-expr, member-access-expr, + int, DecimalNumber function init() { int count = 0; + int[] arr = []; foreach int i in 0+1 ..< 12-2 { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test multiplicative expressions as expressions in range expression (exclusive). -Labels: range-expr, iterable-exclusive, DecimalNumber, int, multiplicative-expr +Labels: range-expr, iterable-exclusive, DecimalNumber, array-type, list-constructor-expr, member-access-expr, int, + multiplicative-expr, additive-expr function init() { int count = 0; + int[] arr = []; foreach int i in 1*2 ..< 36/4 { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 7 + io:println(arr); // @output [2,3,4,5,6,7,8] count = 0; + arr = []; foreach int i in 34%5 ..< 4*5 { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 16 + io:println(arr); // @output [4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19] } Test-Case: output Description: Test binary bitwise expressions as expressions in range expression (exclusive). -Labels: range-expr, iterable-exclusive, binary-bitwise-expr, DecimalNumber, int +Labels: range-expr, iterable-exclusive, binary-bitwise-expr, DecimalNumber, array-type, list-constructor-expr, + member-access-expr, int, additive-expr function init() { int count = 0; + int[] arr = []; foreach int i in (1&2) ..< (4|8) { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 12 + io:println(arr); // @output [0,1,2,3,4,5,6,7,8,9,10,11] count = 0; + arr = []; foreach int i in (6|3) ..< (2^8) { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 3 + io:println(arr); // @output [7,8,9] } Test-Case: output Description: Test checking expressions as expressions in range expression (exclusive). -Labels: range-expr, iterable-exclusive, check, checkpanic, DecimalNumber, error, int, union-type, optional-type +Labels: range-expr, iterable-exclusive, check, checkpanic, DecimalNumber, error, array-type, list-constructor-expr, + member-access-expr, int, union-type, optional-type, additive-expr function init() returns error? { int|error startIndex = 2; int|error endIndex = 12; int count = 0; + int[] arr = []; foreach int i in check startIndex ..< checkpanic endIndex { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [2,3,4,5,6,7,8,9,10,11] } Test-Case: output @@ -1802,11 +2273,14 @@ Labels: range-expr, iterable-exclusive, let-expr, DecimalNumber, int function init() { int count = 0; + int[] arr = []; foreach int i in (let int h1 = 10 in h1) ..< (let int h1 = 25 in h1) { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 15 + io:println(arr); // @output [10,11,12,13,14,15,16,17,18,19,20,21,22,23,24] } Test-Case: output @@ -1815,51 +2289,59 @@ Labels: range-expr, iterable-exclusive, shift-expr, DecimalNumber, int function init() { int count = 0; + int[] arr = []; foreach int i in 1 << 2 ..< 100 >> 4 { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 2 + io:println(arr); // @output [4,5] } Test-Case: output Description: Test conditional expressions as expressions in range expression (exclusive). -Labels: range-expr, iterable-exclusive, conditional-expr, DecimalNumber, error, int, nil-literal, - optional-type, union-type +Labels: range-expr, iterable-exclusive, conditional-expr, DecimalNumber, error, array-type, list-constructor-expr, + member-access-expr, int, nil-literal, optional-type, union-type, additive-expr function init() { int|error a = 10; int? b = (); int count = 0; + int[] arr = []; foreach int i in (a is error ? 5 : a) ..< (b ?: 25) { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 15 + io:println(arr); // @output [10,11,12,13,14,15,16,17,18,19,20,21,22,23,24] } Test-Case: output Description: Test lang.int constants as expressions in range expression (exclusive). -Labels: range-expr, iterable-exclusive, int, int:SIGNED8_MAX_VALUE, int:UNSIGNED8_MAX_VALUE +Labels: range-expr, iterable-exclusive, int, int:SIGNED8_MAX_VALUE, int:UNSIGNED8_MAX_VALUE, additive-expr function init() { int count = 0; foreach int i in int:SIGNED8_MAX_VALUE ..< int:UNSIGNED8_MAX_VALUE { - count = count + 1; + count = count + i; } - io:println(count); // @output 128 + io:println(count); // @output 24384 } Test-Case: output Description: Test range expression (exclusive) with iterable object when values of both expressions are positive integers. -Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, object-type, record-type, optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + additive-expr, object-type, record-type, optional-type function init() { int startIndex = 0; int endIndex = 6; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -1869,21 +2351,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 6 + io:println(arr); // @output [0,1,2,3,4,5] } Test-Case: output Description: Test range expression (exclusive) with iterable object when values of both expressions are negative integers. -Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, object-type, record-type, optional-type, - unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + additive-expr, object-type, record-type, optional-type, unary-minus function init() { int startIndex = -6; int endIndex = -1; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -1893,21 +2378,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 5 + io:println(arr); // @output [-6,-5,-4,-3,-2] } Test-Case: output Description: Test range expression (exclusive) with iterable object when the value of one expression is a negative integer and the value of the other expression is a positive integer. -Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, object-type, record-type, optional-type, - unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + additive-expr, object-type, record-type, optional-type, unary-minus function init() { int startIndex = -10; int endIndex = 20; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -1917,15 +2405,17 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 30 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19] } Test-Case: output Description: Test range expression (exclusive) with iterable object when the value of one expression is a negative integer and the value of the other expression is a positive integer. -Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, object-type, record-type, optional-type, +Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -1941,16 +2431,16 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + count = count + i; } - io:println(count); // @output 8600047 + io:println(count); // @output -28683667958724 } Test-Case: output Description: Test range expression (exclusive) with iterable object when values of both expressions are positive Signed8 integers. -Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, int:Signed8, additive-expr, - object-type, record-type, optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + additive-expr, int:Signed8, additive-expr, object-type, record-type, optional-type function init() { int:Signed8 startIndex = 1; @@ -1964,22 +2454,26 @@ function init() { } range = startIndex ..< endIndex; int count = 0; + int[] arr = []; foreach int i in range { - count += 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) with iterable object when values of both expressions are negative Signed8 integers. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, additive-expr, object-type, - record-type, optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int:Signed8 startIndex = -10; int:Signed8 endIndex = -1; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -1989,21 +2483,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2] } Test-Case: output Description: Test range expression (exclusive) with iterable object when the value of one expression is a negative Signed8 integer and the value of the other expression is a positive Signed8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, additive-expr, object-type, - record-type, optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int:Signed8 startIndex = -10; int:Signed8 endIndex = 2; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -2013,21 +2510,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 12 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1] } Test-Case: output Description: Test range expression (exclusive) with iterable object when values of both expressions are positive Signed16 integers. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, object-type, - record-type, optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, additive-expr, object-type, record-type, optional-type function init() { int:Signed16 startIndex = 1; int:Signed16 endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -2037,21 +2537,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) with iterable object when values of both expressions are negative Signed16 integers. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, object-type, record-type, - optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int:Signed16 startIndex = -10; int:Signed16 endIndex = -1; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -2061,21 +2564,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2] } Test-Case: output Description: Test range expression (exclusive) with iterable object when the value of one expression is a negative Signed16 integer and the value of the other expression is a positive Signed16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, object-type, record-type, - optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int:Signed16 startIndex = -10; int:Signed16 endIndex = 20; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -2085,21 +2591,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 30 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19] } Test-Case: output Description: Test range expression (exclusive) with iterable object when values of both expressions are positive Signed32 integers. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, object-type, record-type, - optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed32, additive-expr, object-type, record-type, optional-type function init() { int:Signed32 startIndex = 1; int:Signed32 endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -2109,21 +2618,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) with iterable object when values of both expressions are negative Signed32 integers. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, object-type, record-type, - optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int:Signed32 startIndex = -10; int:Signed32 endIndex = -1; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -2133,21 +2645,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2] } Test-Case: output Description: Test range expression (exclusive) with iterable object when the value of one expression is a negative Signed32 integer and the value of the other expression is a positive Signed32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, object-type, record-type, - optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int:Signed32 startIndex = -10; int:Signed32 endIndex = 20; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -2157,21 +2672,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 30 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19] } Test-Case: output Description: Test range expression (exclusive) with iterable object when values of both expressions are Unsigned8 integers. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, additive-expr, object-type, record-type, - optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned8, additive-expr, object-type, record-type, optional-type function init() { int:Unsigned8 startIndex = 1; int:Unsigned8 endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -2181,21 +2699,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) with iterable object when values of both expressions are Unsigned16 integers. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, additive-expr, object-type, record-type, - optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned16, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int:Unsigned16 startIndex = 1; int:Unsigned16 endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -2205,21 +2726,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) with iterable object when values of both expressions are Unsigned32 integers. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, additive-expr, object-type, record-type, - optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned32, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int:Unsigned32 startIndex = 1; int:Unsigned32 endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -2229,21 +2753,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, additive-expr, object-type, record-type, - optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, additive-expr, object-type, record-type, optional-type function init() { int startIndex = 1; int:Signed8 endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -2253,21 +2780,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative integer and value of the second expression is a negative Signed8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, additive-expr, object-type, record-type, - optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int startIndex = -10; int:Signed8 endIndex = -1; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -2277,21 +2807,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, additive-expr, object-type, record-type, - optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int startIndex = -10; int:Signed8 endIndex = 2; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -2301,21 +2834,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 12 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, object-type, record-type, - optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, additive-expr, object-type, record-type, optional-type function init() { int startIndex = 1; int:Signed16 endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -2325,21 +2861,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative integer and value of the second expression is a negative Signed16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, object-type, record-type, - optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int startIndex = -10; int:Signed16 endIndex = -1; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -2349,21 +2888,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, object-type, record-type, - optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int startIndex = -10; int:Signed16 endIndex = 2; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -2373,21 +2915,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 12 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, object-type, record-type, - optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed32, additive-expr, object-type, record-type, optional-type function init() { int startIndex = 1; int:Signed32 endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -2397,21 +2942,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative integer and value of the second expression is a negative Signed32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, object-type, record-type, - optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int startIndex = -10; int:Signed32 endIndex = -1; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -2421,21 +2969,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, object-type, record-type, - optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int startIndex = -10; int:Signed32 endIndex = 2; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -2445,21 +2996,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 12 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, additive-expr, object-type, record-type, - optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned8, additive-expr, object-type, record-type, optional-type function init() { int startIndex = 1; int:Unsigned8 endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -2469,21 +3023,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, additive-expr, object-type, record-type, - optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned8, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int startIndex = -10; int:Unsigned8 endIndex = 2; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -2493,21 +3050,25 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 12 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, int, DecimalNumber, byte, additive-expr, object-type, record-type, optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, byte, + additive-expr, object-type, record-type, optional-type function init() { int startIndex = 1; byte endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -2517,22 +3078,25 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, int, DecimalNumber, byte, additive-expr, object-type, record-type, optional-type, - unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, byte, + additive-expr, object-type, record-type, optional-type, unary-minus function init() { int startIndex = -10; byte endIndex = 2; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -2542,21 +3106,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 12 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, additive-expr, object-type, record-type, - optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned16, additive-expr, object-type, record-type, optional-type function init() { int startIndex = 1; int:Unsigned16 endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -2566,21 +3133,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, additive-expr, object-type, record-type, - optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned16, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int startIndex = -10; int:Unsigned16 endIndex = 2; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -2590,21 +3160,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 12 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, additive-expr, object-type, record-type, - optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned32, additive-expr, object-type, record-type, optional-type function init() { int startIndex = 1; int:Unsigned32 endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -2614,21 +3187,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, additive-expr, object-type, record-type, - optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned32, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int startIndex = -10; int:Unsigned32 endIndex = 2; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -2638,21 +3214,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 12 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed8 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, additive-expr, object-type, record-type, - optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, additive-expr, object-type, record-type, optional-type function init() { int:Signed8 startIndex = 1; int endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -2662,21 +3241,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a negative integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, additive-expr, object-type, record-type, - optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int:Signed8 startIndex = -10; int endIndex = -1; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -2686,21 +3268,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, additive-expr, object-type, record-type, - optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int:Signed8 startIndex = -10; int endIndex = 2; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -2710,21 +3295,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 12 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed8 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Signed16, additive-expr, object-type, - record-type, optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, int:Signed16, additive-expr, object-type, record-type, optional-type function init() { int:Signed8 startIndex = 1; int:Signed16 endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -2734,21 +3322,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a negative Signed16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Signed16, additive-expr, object-type, - record-type, optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int:Signed8 startIndex = -10; int:Signed16 endIndex = -1; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -2758,21 +3349,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Signed16, additive-expr, object-type, - record-type, optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int:Signed8 startIndex = -10; int:Signed16 endIndex = 2; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -2782,21 +3376,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 12 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed8 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Signed32, additive-expr, object-type, - record-type, optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, int:Signed32, additive-expr, object-type, record-type, optional-type function init() { int:Signed8 startIndex = 1; int:Signed32 endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -2807,21 +3404,24 @@ function init() { foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a negative Signed32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Signed32, additive-expr, object-type, - record-type, optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int:Signed8 startIndex = -10; int:Signed32 endIndex = -1; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -2831,21 +3431,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Signed32, additive-expr, object-type, - record-type, optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int:Signed8 startIndex = -10; int:Signed32 endIndex = 2; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -2855,21 +3458,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 12 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed8 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Unsigned8, additive-expr, object-type, - record-type, optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, int:Unsigned8, additive-expr, object-type, record-type, optional-type function init() { int:Signed8 startIndex = 1; int:Unsigned8 endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -2880,21 +3486,24 @@ function init() { foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Unsigned8, additive-expr, object-type, - record-type, optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, int:Unsigned8, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int:Signed8 startIndex = -10; int:Unsigned8 endIndex = 2; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -2904,22 +3513,25 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 12 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed8 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, byte, additive-expr, object-type, record-type, - optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, byte, additive-expr, object-type, record-type, optional-type function init() { int:Signed8 startIndex = 1; byte endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -2929,22 +3541,25 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, byte, additive-expr, object-type, record-type, - optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, byte, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int:Signed8 startIndex = -10; byte endIndex = 2; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -2954,21 +3569,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 12 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed8 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Unsigned16, additive-expr, object-type, - record-type, optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, int:Unsigned16, additive-expr, object-type, record-type, optional-type function init() { int:Signed8 startIndex = 1; int:Unsigned16 endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -2978,21 +3596,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Unsigned16, additive-expr, object-type, - record-type, optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, int:Unsigned16, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int:Signed8 startIndex = -10; int:Unsigned16 endIndex = 2; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -3002,21 +3623,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 12 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed8 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Unsigned32, additive-expr, object-type, - record-type, optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, int:Unsigned32, additive-expr, object-type, record-type, optional-type function init() { int:Signed8 startIndex = 1; int:Unsigned32 endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -3026,21 +3650,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Unsigned32, additive-expr, object-type, - record-type, optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, int:Unsigned32, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int:Signed8 startIndex = -10; int:Unsigned32 endIndex = 2; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -3050,21 +3677,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 12 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed16 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, object-type, record-type, - optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, additive-expr, object-type, record-type, optional-type function init() { int:Signed16 startIndex = 1; int endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -3074,21 +3704,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a negative integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, object-type, record-type, - optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int:Signed16 startIndex = -10; int endIndex = -1; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -3098,21 +3731,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, object-type, record-type, - optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int:Signed16 startIndex = -10; int endIndex = 2; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -3122,21 +3758,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 12 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed16 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Signed8, additive-expr, object-type, - record-type, optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, int:Signed8, additive-expr, object-type, record-type, optional-type function init() { int:Signed16 startIndex = 1; int:Signed8 endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -3146,21 +3785,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a negative Signed8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Signed8, additive-expr, object-type, - record-type, optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int:Signed16 startIndex = -10; int:Signed8 endIndex = -1; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -3170,21 +3812,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Signed8, additive-expr, object-type, - record-type, optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int:Signed16 startIndex = -10; int:Signed8 endIndex = 2; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -3194,21 +3839,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 12 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed16 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Signed32, additive-expr, object-type, - record-type, optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, int:Signed32, additive-expr, object-type, record-type, optional-type function init() { int:Signed16 startIndex = 1; int:Signed32 endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -3218,21 +3866,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a negative Signed32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Signed32, additive-expr, object-type, - record-type, optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int:Signed16 startIndex = -10; int:Signed32 endIndex = -1; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -3242,21 +3893,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Signed32, additive-expr, object-type, - record-type, optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int:Signed16 startIndex = -10; int:Signed32 endIndex = 2; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -3266,21 +3920,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 12 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed16 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Unsigned8, additive-expr, object-type, - record-type, optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, int:Unsigned8, additive-expr, object-type, record-type, optional-type function init() { int:Signed16 startIndex = 1; int:Unsigned8 endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -3290,21 +3947,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Unsigned8, additive-expr, object-type, - record-type, optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, int:Unsigned8, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int:Signed16 startIndex = -10; int:Unsigned8 endIndex = 2; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -3314,22 +3974,25 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 12 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed16 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, byte, additive-expr, object-type, record-type, - optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, byte, additive-expr, object-type, record-type, optional-type function init() { int:Signed16 startIndex = 1; byte endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -3339,22 +4002,25 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, byte, additive-expr, object-type, record-type, - optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, byte, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int:Signed16 startIndex = -10; byte endIndex = 2; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -3364,21 +4030,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 12 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed16 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Unsigned16, additive-expr, object-type, - record-type, optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, int:Unsigned16, additive-expr, object-type, record-type, optional-type function init() { int:Signed16 startIndex = 1; int:Unsigned16 endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -3388,21 +4057,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Unsigned16, additive-expr, object-type, - record-type, optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, int:Unsigned16, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int:Signed16 startIndex = -10; int:Unsigned16 endIndex = 2; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -3412,21 +4084,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 12 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed16 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Unsigned32, additive-expr, object-type, - record-type, optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, int:Unsigned32, additive-expr, object-type, record-type, optional-type function init() { int:Signed16 startIndex = 1; int:Unsigned32 endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -3436,21 +4111,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Unsigned32, additive-expr, object-type, - record-type, optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, int:Unsigned32, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int:Signed16 startIndex = -10; int:Unsigned32 endIndex = 2; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -3460,21 +4138,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 12 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed32 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, object-type, record-type, - optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed32, additive-expr, object-type, record-type, optional-type function init() { int:Signed32 startIndex = 1; int endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -3484,21 +4165,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a negative integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, object-type, record-type, - optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int:Signed32 startIndex = -10; int endIndex = -1; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -3508,21 +4192,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, object-type, record-type, - optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int:Signed32 startIndex = -10; int endIndex = 2; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -3532,21 +4219,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 12 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed32 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Signed8, additive-expr, object-type, - record-type, optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed32, int:Signed8, additive-expr, object-type, record-type, optional-type function init() { int:Signed32 startIndex = 1; int:Signed8 endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -3556,21 +4246,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a negative Signed8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Signed8, additive-expr, object-type, - record-type, optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed32, int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int:Signed32 startIndex = -10; int:Signed8 endIndex = -1; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -3580,21 +4273,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Signed8, additive-expr, object-type, - record-type, optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed32, int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int:Signed32 startIndex = -10; int:Signed8 endIndex = 2; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -3604,21 +4300,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 12 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed32 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Signed16, additive-expr, object-type, - record-type, optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed32, int:Signed16, additive-expr, object-type, record-type, optional-type function init() { int:Signed32 startIndex = 1; int:Signed16 endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -3628,21 +4327,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a negative Signed16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Signed16, additive-expr, object-type, - record-type, optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed32, int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int:Signed32 startIndex = -10; int:Signed16 endIndex = -1; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -3652,21 +4354,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Signed16, additive-expr, object-type, - record-type, optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed32, int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int:Signed32 startIndex = -10; int:Signed16 endIndex = 2; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -3676,21 +4381,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 12 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed32 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Unsigned8, additive-expr, object-type, - record-type, optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed32, int:Unsigned8, additive-expr, object-type, record-type, optional-type function init() { int:Signed32 startIndex = 1; int:Unsigned8 endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -3700,21 +4408,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Unsigned8, additive-expr, object-type, - record-type, optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed32, int:Unsigned8, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int:Signed32 startIndex = -10; int:Unsigned8 endIndex = 2; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -3724,22 +4435,25 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 12 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed32 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, bye, additive-expr, object-type, record-type, - optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed32, bye, additive-expr, object-type, record-type, optional-type function init() { int:Signed32 startIndex = 1; byte endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -3749,22 +4463,25 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, byte, additive-expr, object-type, record-type, - optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed32, byte, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int:Signed32 startIndex = -10; byte endIndex = 2; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -3774,21 +4491,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 12 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed32 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Unsigned16, additive-expr, object-type, - record-type, optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed32, int:Unsigned16, additive-expr, object-type, record-type, optional-type function init() { int:Signed32 startIndex = 1; int:Unsigned16 endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -3798,21 +4518,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Unsigned16, additive-expr, object-type, - record-type, optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed32, int:Unsigned16, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int:Signed32 startIndex = -10; int:Unsigned16 endIndex = 2; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -3822,21 +4545,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 12 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed32 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Unsigned32, additive-expr, object-type, - record-type, optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed32, int:Unsigned32, additive-expr, object-type, record-type, optional-type function init() { int:Signed32 startIndex = 1; int:Unsigned32 endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -3846,21 +4572,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Unsigned32, additive-expr, object-type, - record-type, optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed32, int:Unsigned32, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int:Signed32 startIndex = -10; int:Unsigned32 endIndex = 2; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -3870,21 +4599,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 12 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned8 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, additive-expr, object-type, record-type, - optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned8, additive-expr, object-type, record-type, optional-type function init() { int:Unsigned8 startIndex = 1; int endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -3894,21 +4626,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned8 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, int:Signed8, additive-expr, object-type, - record-type, optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned8, int:Signed8, additive-expr, object-type, record-type, optional-type function init() { int:Unsigned8 startIndex = 1; int:Signed8 endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -3919,21 +4654,24 @@ function init() { foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned8 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, int:Signed16, additive-expr, object-type, - record-type, optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned8, int:Signed16, additive-expr, object-type, record-type, optional-type function init() { int:Unsigned8 startIndex = 1; int:Signed16 endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -3943,21 +4681,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned8 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, int:Signed32, additive-expr, object-type, - record-type, optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned8, int:Signed32, additive-expr, object-type, record-type, optional-type function init() { int:Unsigned8 startIndex = 1; int:Signed32 endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -3967,22 +4708,25 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned8 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, byte, additive-expr, object-type, record-type, - optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned8, byte, additive-expr, object-type, record-type, optional-type function init() { int:Unsigned8 startIndex = 1; byte endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -3992,21 +4736,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned8 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, int:Unsigned16, additive-expr, object-type, - record-type, optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned8, int:Unsigned16, additive-expr, object-type, record-type, optional-type function init() { int:Unsigned8 startIndex = 1; int:Unsigned16 endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -4016,21 +4763,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned8 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, int:Unsigned32, additive-expr, object-type, - record-type, optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned8, int:Unsigned32, additive-expr, object-type, record-type, optional-type function init() { int:Unsigned8 startIndex = 1; int:Unsigned32 endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -4041,21 +4791,24 @@ function init() { foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned16 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, additive-expr, object-type, record-type, - optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned16, additive-expr, object-type, record-type, optional-type function init() { int:Unsigned16 startIndex = 1; int endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -4065,21 +4818,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned16 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, int:Signed8, additive-expr, object-type, - record-type, optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned16, int:Signed8, additive-expr, object-type, record-type, optional-type function init() { int:Unsigned16 startIndex = 1; int:Signed8 endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -4089,21 +4845,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned16 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, int:Signed16, additive-expr, object-type, - record-type, optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned16, int:Signed16, additive-expr, object-type, record-type, optional-type function init() { int:Unsigned16 startIndex = 1; int:Signed16 endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -4113,21 +4872,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned16 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, int:Signed32, additive-expr, object-type, - record-type, optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned16, int:Signed32, additive-expr, object-type, record-type, optional-type function init() { int:Unsigned16 startIndex = 1; int:Signed32 endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -4137,21 +4899,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned16 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, int:Unsigned8, additive-expr, object-type, - record-type, optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned16, int:Unsigned8, additive-expr, object-type, record-type, optional-type function init() { int:Unsigned16 startIndex = 1; int:Unsigned8 endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -4162,22 +4927,25 @@ function init() { foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned16 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, byte, additive-expr, object-type, record-type, - optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned16, byte, additive-expr, object-type, record-type, optional-type function init() { int:Unsigned16 startIndex = 1; byte endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -4187,21 +4955,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned16 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, int:Unsigned32, additive-expr, object-type, - record-type, optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned16, int:Unsigned32, additive-expr, object-type, record-type, optional-type function init() { int:Unsigned16 startIndex = 1; int:Unsigned32 endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -4211,21 +4982,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned32 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, additive-expr, object-type, record-type, - optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned32, additive-expr, object-type, record-type, optional-type function init() { int:Unsigned32 startIndex = 1; int endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -4235,21 +5009,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned32 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, int:Signed8, additive-expr, object-type, - record-type, optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned32, int:Signed8, additive-expr, object-type, record-type, optional-type function init() { int:Unsigned32 startIndex = 1; int:Signed8 endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -4259,21 +5036,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned32 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, int:Signed16, additive-expr, object-type, - record-type, optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned32, int:Signed16, additive-expr, object-type, record-type, optional-type function init() { int:Unsigned32 startIndex = 1; int:Signed16 endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -4283,21 +5063,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned32 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, int:Signed32, additive-expr, object-type, - record-type, optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned32, int:Signed32, additive-expr, object-type, record-type, optional-type function init() { int:Unsigned32 startIndex = 1; int:Signed32 endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -4307,21 +5090,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned32 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, int:Unsigned8, additive-expr, object-type, - record-type, optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned32, int:Unsigned8, additive-expr, object-type, record-type, optional-type function init() { int:Unsigned32 startIndex = 1; int:Unsigned8 endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -4331,22 +5117,25 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned32 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, byte, additive-expr, object-type, record-type, - optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned32, byte, additive-expr, object-type, record-type, optional-type function init() { int:Unsigned32 startIndex = 1; byte endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -4356,21 +5145,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned32 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, int:Unsigned16, additive-expr, object-type, - record-type, optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned32, int:Unsigned16, additive-expr, object-type, record-type, optional-type function init() { int:Unsigned32 startIndex = 1; int:Unsigned16 endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -4380,17 +5172,19 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) with iterable object when values of both expressions are of user-defined subtypes of int. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, int, DecimalNumber, singleton-type, union-type, module-type-decl, - additive-expr, object-type, record-type, optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + singleton-type, union-type, module-type-decl, additive-expr, object-type, record-type, optional-type type Ints 1|10; @@ -4398,6 +5192,7 @@ function init() { Ints startIndex = 1; Ints endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -4407,22 +5202,25 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) with iterable object when values of both expressions are of union of int subtypes. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Unsigned32, union-type, additive-expr, - object-type, record-type, optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, int:Unsigned32, union-type, additive-expr, object-type, record-type, optional-type function init() { int:Signed8|int:Unsigned32 startIndex = 1; int:Signed8|int:Unsigned32 endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -4432,20 +5230,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) with iterable object when the value of the first expression and the value of the second expression is equal. -Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, object-type, record-type, optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + additive-expr, object-type, record-type, optional-type function init() { int startIndex = 5; int endIndex = 5; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -4455,20 +5257,24 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 0 + io:println(arr); // @output [] } Test-Case: output Description: Test range expression (exclusive) when the value of the first expression is less than the value of the second expression. -Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, object-type, record-type, optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + additive-expr, object-type, record-type, optional-type function init() { int startIndex = 5; int endIndex = 3; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -4478,19 +5284,23 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 0 + io:println(arr); // @output [] } Test-Case: output Description: Test range expression (exclusive) with iterable object when the types of the expressions are inferred. -Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, object-type, record-type, optional-type, var +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + additive-expr, object-type, record-type, optional-type, var function init() { var startIndex = 1; var endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -4500,31 +5310,38 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) when the types of the expressions and type of the range expression are inferred. -Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, var +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + additive-expr, var function init() { var startIndex = 1; var endIndex = 10; int count = 0; + int[] arr = []; var range = startIndex ..< endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) at module level. -Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, object-type, record-type, optional-type, var +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + additive-expr, object-type, record-type, optional-type, var int startIndex = 1; int endIndex = 10; @@ -4538,16 +5355,20 @@ object { function init() { int count = 0; + int[] arr = []; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test range expression (exclusive) at module level. -Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, var +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + additive-expr, var int startIndex = 1; int endIndex = 10; @@ -4556,16 +5377,20 @@ var range = startIndex ..< endIndex; function init() { int count = 0; + int[] arr = []; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test iterable object returned by the range expression (exclusive). -Labels: range-expr, int, DecimalNumber, object-type, optional-type, var, value:toBalString, method-call-expr +Labels: range-expr, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, object-type, + optional-type, var, value:toBalString, method-call-expr function init() { object { @@ -4591,8 +5416,9 @@ function init() { Test-Case: output Description: Test field and member access as expressions in range expression (exclusive). -Labels: range-expr, iterable-object, array-type, DecimalNumber, field-access-expr, int, list-constructor, - mapping-constructor, member-access-expr, module-type-defn, object-type, record-type, optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, field-access-expr, + DecimalNumber, int, mapping-constructor-expr, module-type-defn, object-type, record-type, optional-type, + additive-expr type Record record { int x; @@ -4602,6 +5428,7 @@ function init() { Record c = {x: 10}; int[] d = [30, 40]; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -4611,15 +5438,18 @@ function init() { } range = c.x ..< d[0]; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 20 + io:println(arr); // @output [10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29] } Test-Case: output Description: Test function and method call as expressions in range expression (exclusive). -Labels: range-expr, iterable-object, DecimalNumber, int, explicit-new-expr, function-call-expr - module-class-defn, method-call-expr, object-type, record-type, optional-type +Labels: range-expr, iterable-object, DecimalNumber, array-type, list-constructor-expr, member-access-expr, + int, explicit-new-expr, function-call-expr, module-class-defn, method-call-expr, object-type, record-type, + optional-type, additive-expr class Class { function getInt() returns int { @@ -4630,6 +5460,7 @@ class Class { function init() { Class cls = new Class(); int count = 0; + int[] arr = []; object { *object:Iterable; @@ -4639,9 +5470,11 @@ function init() { } range = cls.getInt() ..< getInt(); foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } function getInt() returns int { @@ -4650,10 +5483,12 @@ function getInt() returns int { Test-Case: output Description: Test type cast expression as expressions in range expression (exclusive). -Labels: range-expr, iterable-object, DecimalNumber, int, type-cast-expr, object-type, record-type, optional-type +Labels: range-expr, iterable-object, DecimalNumber, array-type, list-constructor-expr, member-access-expr, + int, type-cast-expr, object-type, record-type, optional-type, additive-expr function init() { int count = 0; + int[] arr = []; object { *object:Iterable; @@ -4663,18 +5498,21 @@ function init() { } range = 1.0 ..< 10.0; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test unary expressions as expressions in range expression (exclusive). -Labels: range-expr, iterable-object, DecimalNumber, int, unary-complement, unary-minus, unary-plus, - object-type, record-type, optional-type +Labels: range-expr, iterable-object, DecimalNumber, array-type, list-constructor-expr, member-access-expr, + int, unary-complement, unary-minus, unary-plus, object-type, record-type, optional-type, additive-expr function init() { int count = 0; + int[] arr = []; object { *object:Iterable; @@ -4684,25 +5522,32 @@ function init() { } range = -10 ..< +2; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 12 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1] count = 0; + arr = []; range = -10 ..< ~2; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 7 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4] } Test-Case: output Description: Test additive expression as expressions in range expression (exclusive). -Labels: range-expr, iterable-object, additive-expr, int, DecimalNumber, object-type, record-type, optional-type +Labels: range-expr, iterable-object, additive-expr, array-type, list-constructor-expr, member-access-expr, int, + DecimalNumber, object-type, record-type, optional-type function init() { int count = 0; + int[] arr = []; object { *object:Iterable; @@ -4712,18 +5557,21 @@ function init() { } range = 0+1 ..< 12-2; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } Test-Case: output Description: Test multiplicative expressions as expressions in range expression (exclusive). -Labels: range-expr, iterable-object, additive-expr, DecimalNumber, int, multiplicative-expr, object-type, record-type, - optional-type +Labels: range-expr, iterable-object, additive-expr, DecimalNumber, array-type, list-constructor-expr, + member-access-expr, int, multiplicative-expr, object-type, record-type, optional-type function init() { int count = 0; + int[] arr = []; object { *object:Iterable; @@ -4733,26 +5581,32 @@ function init() { } range = 1*2 ..< 36/4; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 7 + io:println(arr); // @output [2,3,4,5,6,7,8] count = 0; + arr = []; range = 34%5 ..< 4*5; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 16 + io:println(arr); // @output [4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19] } Test-Case: output Description: Test binary bitwise expressions as expressions in range expression (exclusive). -Labels: range-expr, iterable-object, binary-bitwise-expr, DecimalNumber, int, additive-expr, object-type, record-type, - optional-type +Labels: range-expr, iterable-object, binary-bitwise-expr, DecimalNumber, array-type, list-constructor-expr, + member-access-expr, int, additive-expr, object-type, record-type, optional-type function init() { int count = 0; + int[] arr = []; object { *object:Iterable; @@ -4762,28 +5616,34 @@ function init() { } range = (1&2) ..< (4|8); foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 12 + io:println(arr); // @output [0,1,2,3,4,5,6,7,8,9,10,11] count = 0; + arr = []; range = (6|3) ..< (2^8); foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 3 + io:println(arr); // @output [7,8,9] } Test-Case: output Description: Test checking expressions as expressions in range expression (exclusive). -Labels: range-expr, iterable-object, check, checkpanic, DecimalNumber, error, additive-expr, int, union-type, - object-type, record-type, optional-type +Labels: range-expr, iterable-object, check, checkpanic, DecimalNumber, error, additive-expr, array-type, + list-constructor-expr, member-access-expr, int, union-type, object-type, record-type, optional-type function init() returns error? { int|error startIndex = 2; int|error endIndex = 12; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -4793,18 +5653,21 @@ function init() returns error? { } range = check startIndex ..< checkpanic endIndex; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [2,3,4,5,6,7,8,9,10,11] } Test-Case: output Description: Test let expression as expressions in range expression (exclusive). -Labels: range-expr, iterable-object, DecimalNumber, int, let-expr, additive-expr, object-type, record-type, - optional-type +Labels: range-expr, iterable-object, DecimalNumber, array-type, list-constructor-expr, member-access-expr, int, let-expr, + additive-expr, object-type, record-type, optional-type function init() { int count = 0; + int[] arr = []; object { *object:Iterable; @@ -4814,18 +5677,21 @@ function init() { } range = (let int h1 = 10 in h1) ..< (let int h1 = 25 in h1); foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 15 + io:println(arr); // @output [10,11,12,13,14,15,16,17,18,19,20,21,22,23,24] } Test-Case: output Description: Test shift expressions as expressions in range expression (exclusive). -Labels: range-expr, iterable-object, DecimalNumber, int, shift-expr, additive-expr, object-type, record-type, - optional-type +Labels: range-expr, iterable-object, DecimalNumber, array-type, list-constructor-expr, member-access-expr, int, + shift-expr, additive-expr, object-type, record-type, optional-type function init() { int count = 0; + int[] arr = []; object { *object:Iterable; @@ -4835,20 +5701,23 @@ function init() { } range = 1<<2 ..< 100>>4; foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 2 + io:println(arr); // @output [4,5] } Test-Case: output Description: Test conditional expressions as expressions in range expression (exclusive). -Labels: range-expr, iterable-object, conditional-expr, DecimalNumber, error, int, additive-expr, nil-literal, - optional-type, union-type, object-type, record-type +Labels: range-expr, iterable-object, conditional-expr, DecimalNumber, error, array-type, list-constructor-expr, + member-access-expr, int, additive-expr, nil-literal, optional-type, union-type, object-type, record-type function init() { int|error a = 10; int? b = (); int count = 0; + int[] arr = []; object { *object:Iterable; @@ -4858,14 +5727,16 @@ function init() { } range = (a is error ? 5 : a) ..< (b ?: 25); foreach int i in range { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 15 + io:println(arr); // @output [10,11,12,13,14,15,16,17,18,19,20,21,22,23,24] } Test-Case: output Description: Test lang.int constants as expressions in range expression (exclusive). -Labels: range-expr, iterable-object, int, DecimalNumber, int:SIGNED8_MAX_VALUE, int:UNSIGNED8_MAX_VALUE, additive-expr, +Labels: range-expr, iterable-object, int, DecimalNumber, int:SIGNED8_MAX_VALUE, int:UNSIGNED8_MAX_VALUE, additive-expr, object-type, record-type, optional-type function init() { @@ -4879,25 +5750,28 @@ function init() { } range = int:SIGNED8_MAX_VALUE ..< int:UNSIGNED8_MAX_VALUE; foreach int i in range { - count = count + 1; + count = count + i; } - io:println(count); // @output 128 + io:println(count); // @output 24384 } Test-Case: output Description: Test isolatedness of range expression (exclusive). Fail-Issue: ballerina-platform/ballerina-lang#33163 -Labels: range-expr, iterable-object, object-type, additive-expr, int, DecimalNumber, function-call-expr, record-type, - optional-type, lock-stmt +Labels: range-expr, iterable-object, object-type, additive-expr, array-type, list-constructor-expr, member-access-expr, + int, DecimalNumber, function-call-expr, record-type, optional-type, lock-stmt -isolated int i = 1; +isolated int j = 1; function init() { int count = 0; + int[] arr = []; foreach int i in getRange() { - count = count + 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } function getRange() returns object { @@ -4907,14 +5781,15 @@ function getRange() returns object { }; } { lock { - return i ..< i + 9; + return j ..< j + 9; } } Test-Case: output -Description: Test isolatedness of range expression (exclusive). +Description: Test isolatedness of the resultant object of the range expression (exclusive). Fail-Issue: ballerina-platform/ballerina-lang#33163 -Labels: range-expr, object-type, record-type, int, optional-type, is-expr, any, type-cast-expr +Labels: range-expr, object-type, record-type, array-type, list-constructor-expr, member-access-expr, int, optional-type, + is-expr, any, type-cast-expr function init() { object { @@ -4928,9 +5803,10 @@ function init() { } Test-Case: output -Description: Test isolatedness of range expression (exclusive). +Description: Test isolatedness of the iterator() and next() methods of range expression (exclusive). Fail-Issue: ballerina-platform/ballerina-lang#33163 -Labels: range-expr, object-type, int, DecimalNumber, record-type, optional-type, is-expr, method-call-expr +Labels: range-expr, object-type, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, record-type, + optional-type, is-expr, method-call-expr function init() { object { @@ -4946,7 +5822,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with query expression. -Labels: range-expr, array-type, int, DecimalNumber, query-expr +Labels: range-expr, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, query-expr function init() { int[] a = from int i in 1 ..< 10 diff --git a/conformance/lang/expressions/range-expr/range_expr_inclusive.balt b/conformance/lang/expressions/range-expr/range_expr_inclusive.balt index e86e76f3..951544d0 100644 --- a/conformance/lang/expressions/range-expr/range_expr_inclusive.balt +++ b/conformance/lang/expressions/range-expr/range_expr_inclusive.balt @@ -1,1583 +1,2001 @@ Test-Case: output Description: Test range expression (inclusive) when values of both expressions are positive integers. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + additive-expr function init() { int startIndex = 0; int endIndex = 6; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 7 + io:println(arr); // @output [0,1,2,3,4,5,6] } Test-Case: output Description: Test range expression (inclusive) when values of both expressions are negative integers. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, unary-minus, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + unary-minus, additive-expr function init() { int startIndex = -6; int endIndex = -1; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 6 + io:println(arr); // @output [-6,-5,-4,-3,-2,-1] } Test-Case: output Description: Test range expression (inclusive) when the value of one expression is a negative integer and the value of the other expression is a positive integer. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, unary-minus, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + unary-minus, additive-expr function init() { int startIndex = -10; int endIndex = 20; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 31 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20] } Test-Case: output Description: Test range expression (inclusive) when the value of one expression is a negative integer and the value of the other expression is a positive integer. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, unary-minus, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + unary-minus, additive-expr function init() { int startIndex = -7635315; int endIndex = 964732; int count = 0; foreach int i in startIndex ... endIndex { - count = count + 1; + count = count + i; } - io:println(count); // @output 8600048 + io:println(count); // @output -28683666993992 } Test-Case: output Description: Test range expression (inclusive) when values of both expressions are positive Signed8 integers. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, additive-expr function init() { int:Signed8 startIndex = 1; int:Signed8 endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { - count += 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) when values of both expressions are negative Signed8 integers. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, unary-minus, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, unary-minus, additive-expr function init() { int:Signed8 startIndex = -10; int:Signed8 endIndex = -1; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1] } Test-Case: output Description: Test range expression (inclusive) when the value of one expression is a negative Signed8 integer and the value of the other expression is a positive Signed8 integer. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, unary-minus, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, unary-minus, additive-expr function init() { int:Signed8 startIndex = -10; int:Signed8 endIndex = 20; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 31 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20] } Test-Case: output Description: Test range expression (inclusive) when values of both expressions are positive Signed16 integers. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed16, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, additive-expr function init() { int:Signed16 startIndex = 1; int:Signed16 endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) when values of both expressions are negative Signed16 integers. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed16, unary-minus, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, unary-minus, additive-expr function init() { int:Signed16 startIndex = -10; int:Signed16 endIndex = -1; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1] } Test-Case: output Description: Test range expression (inclusive) when the value of one expression is a negative Signed16 integer and the value of the other expression is a positive Signed16 integer. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed16, unary-minus, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, unary-minus, additive-expr function init() { int:Signed16 startIndex = -10; int:Signed16 endIndex = 20; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 31 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20] } Test-Case: output Description: Test range expression (inclusive) when values of both expressions are positive Signed32 integers. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed32, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed32, additive-expr function init() { int:Signed32 startIndex = 1; int:Signed32 endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) when values of both expressions are negative Signed32 integers. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed32, unary-minus, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed32, unary-minus, additive-expr function init() { int:Signed32 startIndex = -10; int:Signed32 endIndex = -1; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1] } Test-Case: output Description: Test range expression (inclusive) when the value of one expression is a negative Signed32 integer and the value of the other expression is a positive Signed32 integer. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed32, unary-minus, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed32, unary-minus, additive-expr function init() { int:Signed32 startIndex = -10; int:Signed32 endIndex = 20; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 31 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20] } Test-Case: output Description: Test range expression (inclusive) when values of both expressions are Unsigned8 integers. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Unsigned8, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned8, additive-expr function init() { int:Unsigned8 startIndex = 1; int:Unsigned8 endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) when values of both expressions are Unsigned16 integers. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Unsigned16, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned16, additive-expr function init() { int:Unsigned16 startIndex = 1; int:Unsigned16 endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) when values of both expressions are Unsigned32 integers. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Unsigned32, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned32, additive-expr function init() { int:Unsigned32 startIndex = 1; int:Unsigned32 endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, additive-expr function init() { int startIndex = 1; int:Signed8 endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative integer and value of the second expression is a negative Signed8 integer. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, unary-minus, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, unary-minus, additive-expr function init() { int startIndex = -10; int:Signed8 endIndex = -1; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, unary-minus, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, unary-minus, additive-expr function init() { int startIndex = -10; int:Signed8 endIndex = 2; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 13 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2] + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed16, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, additive-expr function init() { int startIndex = 1; int:Signed16 endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative integer and value of the second expression is a negative Signed16 integer. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed16, unary-minus, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, unary-minus, additive-expr function init() { int startIndex = -10; int:Signed16 endIndex = -1; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed16, unary-minus, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, unary-minus, additive-expr function init() { int startIndex = -10; int:Signed16 endIndex = 2; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 13 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed32, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed32, additive-expr function init() { int startIndex = 1; int:Signed32 endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative integer and value of the second expression is a negative Signed32 integer. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed32, unary-minus, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed32, unary-minus, additive-expr function init() { int startIndex = -10; int:Signed32 endIndex = -1; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed32, unary-minus, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed32, unary-minus, additive-expr function init() { int startIndex = -10; int:Signed32 endIndex = 2; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 13 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Unsigned8, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned8, additive-expr function init() { int startIndex = 1; int:Unsigned8 endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Unsigned8, unary-minus, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned8, unary-minus, additive-expr function init() { int startIndex = -10; int:Unsigned8 endIndex = 2; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 13 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-inclusive, int, DecimalNumber, byte, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + byte, additive-expr function init() { int startIndex = 1; byte endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-inclusive, int, DecimalNumber, byte, unary-minus, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + byte, unary-minus, additive-expr function init() { int startIndex = -10; byte endIndex = 2; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 13 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Unsigned16, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned16, additive-expr function init() { int startIndex = 1; int:Unsigned16 endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Unsigned16, unary-minus, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned16, unary-minus, additive-expr function init() { int startIndex = -10; int:Unsigned16 endIndex = 2; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 13 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Unsigned32, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned32, additive-expr function init() { int startIndex = 1; int:Unsigned32 endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Unsigned32, unary-minus, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned32, unary-minus, additive-expr function init() { int startIndex = -10; int:Unsigned32 endIndex = 2; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 13 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive Signed8 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, additive-expr function init() { int:Signed8 startIndex = 1; int endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a negative integer. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, unary-minus, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, unary-minus, additive-expr function init() { int:Signed8 startIndex = -10; int endIndex = -1; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, unary-minus, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, unary-minus, additive-expr function init() { int:Signed8 startIndex = -10; int endIndex = 2; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 13 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive Signed8 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, int:Signed16, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, int:Signed16, additive-expr function init() { int:Signed8 startIndex = 1; int:Signed16 endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a negative Signed16 integer. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, int:Signed16, unary-minus, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, int:Signed16, unary-minus, additive-expr function init() { int:Signed8 startIndex = -10; int:Signed16 endIndex = -1; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, int:Signed16, unary-minus, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, int:Signed16, unary-minus, additive-expr function init() { int:Signed8 startIndex = -10; int:Signed16 endIndex = 2; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 13 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive Signed8 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, int:Signed32, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, int:Signed32, additive-expr function init() { int:Signed8 startIndex = 1; int:Signed32 endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a negative Signed32 integer. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, int:Signed32, unary-minus, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, int:Signed32, unary-minus, additive-expr function init() { int:Signed8 startIndex = -10; int:Signed32 endIndex = -1; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, int:Signed32, unary-minus, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, int:Signed32, unary-minus, additive-expr function init() { int:Signed8 startIndex = -10; int:Signed32 endIndex = 2; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 13 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive Signed8 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, int:Unsigned8, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, int:Unsigned8, additive-expr function init() { int:Signed8 startIndex = 1; int:Unsigned8 endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, int:Unsigned8, unary-minus, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, int:Unsigned8, unary-minus, additive-expr function init() { int:Signed8 startIndex = -10; int:Unsigned8 endIndex = 2; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 13 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive Signed8 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, byte, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, byte, additive-expr function init() { int:Signed8 startIndex = 1; byte endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a byte. -Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, byte, unary-minus, additive-expr +Fail-Issue: ballerina-platform/ballerina-lang#33139 +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, byte, unary-minus, additive-expr function init() { int:Signed8 startIndex = -10; byte endIndex = 2; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 13 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive Signed8 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, int:Unsigned16, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, int:Unsigned16, additive-expr function init() { int:Signed8 startIndex = 1; int:Unsigned16 endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, int:Unsigned16, unary-minus, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, int:Unsigned16, unary-minus, additive-expr function init() { int:Signed8 startIndex = -10; int:Unsigned16 endIndex = 2; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 13 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive Signed8 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, int:Unsigned32, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, int:Unsigned32, additive-expr function init() { int:Signed8 startIndex = 1; int:Unsigned32 endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, int:Unsigned32, unary-minus, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, int:Unsigned32, unary-minus, additive-expr function init() { int:Signed8 startIndex = -10; int:Unsigned32 endIndex = 2; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 13 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive Signed16 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed16, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, additive-expr function init() { int:Signed16 startIndex = 1; int endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a negative integer. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed16, unary-minus, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, unary-minus, additive-expr function init() { int:Signed16 startIndex = -10; int endIndex = -1; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed16, unary-minus, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, unary-minus, additive-expr function init() { int:Signed16 startIndex = -10; int endIndex = 2; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 13 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive Signed16 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, int:Signed16, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, int:Signed16, additive-expr function init() { int:Signed16 startIndex = 1; int:Signed8 endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a negative Signed8 integer. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, int:Signed16, unary-minus, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, int:Signed16, unary-minus, additive-expr function init() { int:Signed16 startIndex = -10; int:Signed8 endIndex = -1; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, int:Signed16, unary-minus, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, int:Signed16, unary-minus, additive-expr function init() { int:Signed16 startIndex = -10; int:Signed8 endIndex = 2; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 13 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive Signed16 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed16, int:Signed32, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, int:Signed32, additive-expr function init() { int:Signed16 startIndex = 1; int:Signed32 endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a negative Signed32 integer. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed16, int:Signed32, unary-minus, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, int:Signed32, unary-minus, additive-expr function init() { int:Signed16 startIndex = -10; int:Signed32 endIndex = -1; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed16, int:Signed32, unary-minus, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, int:Signed32, unary-minus, additive-expr function init() { int:Signed16 startIndex = -10; int:Signed32 endIndex = 2; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 13 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive Signed16 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed16, int:Unsigned8, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, int:Unsigned8, additive-expr function init() { int:Signed16 startIndex = 1; int:Unsigned8 endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed16, int:Unsigned8, unary-minus, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, int:Unsigned8, unary-minus, additive-expr function init() { int:Signed16 startIndex = -10; int:Unsigned8 endIndex = 2; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 13 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive Signed16 integer and value of the second expression is a byte. -Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed16, byte, additive-expr +Fail-Issue: ballerina-platform/ballerina-lang#33139 +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, byte, additive-expr function init() { int:Signed16 startIndex = 1; byte endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a byte. -Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed16, byte, unary-minus, additive-expr +Fail-Issue: ballerina-platform/ballerina-lang#33139 +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, byte, unary-minus, additive-expr function init() { int:Signed16 startIndex = -10; byte endIndex = 2; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 13 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive Signed16 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed16, int:Unsigned16, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, int:Unsigned16, additive-expr function init() { int:Signed16 startIndex = 1; int:Unsigned16 endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed16, int:Unsigned16, unary-minus, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, int:Unsigned16, unary-minus, additive-expr function init() { int:Signed16 startIndex = -10; int:Unsigned16 endIndex = 2; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 13 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive Signed16 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed16, int:Unsigned32, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, int:Unsigned32, additive-expr function init() { int:Signed16 startIndex = 1; int:Unsigned32 endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed16, int:Unsigned32, unary-minus, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, int:Unsigned32, unary-minus, additive-expr function init() { int:Signed16 startIndex = -10; int:Unsigned32 endIndex = 2; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 13 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive Signed32 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed32, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed32, additive-expr function init() { int:Signed32 startIndex = 1; int endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a negative integer. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed32, unary-minus, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed32, unary-minus, additive-expr function init() { int:Signed32 startIndex = -10; int endIndex = -1; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed32, unary-minus, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed32, unary-minus, additive-expr function init() { int:Signed32 startIndex = -10; int endIndex = 2; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 13 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive Signed32 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, int:Signed32, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, int:Signed32, additive-expr function init() { int:Signed32 startIndex = 1; int:Signed8 endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a negative Signed8 integer. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, int:Signed32, unary-minus, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, int:Signed32, unary-minus, additive-expr function init() { int:Signed32 startIndex = -10; int:Signed8 endIndex = -1; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, int:Signed32, unary-minus, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, int:Signed32, unary-minus, additive-expr function init() { int:Signed32 startIndex = -10; int:Signed8 endIndex = 2; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 13 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive Signed32 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed16, int:Signed32, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, int:Signed32, additive-expr function init() { int:Signed32 startIndex = 1; int:Signed16 endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a negative Signed16 integer. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed16, int:Signed32, unary-minus, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, int:Signed32, unary-minus, additive-expr function init() { int:Signed32 startIndex = -10; int:Signed16 endIndex = -1; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed16, int:Signed32, unary-minus, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, int:Signed32, unary-minus, additive-expr function init() { int:Signed32 startIndex = -10; int:Signed16 endIndex = 2; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 13 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive Signed32 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed32, int:Unsigned8, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed32, int:Unsigned8, additive-expr function init() { int:Signed32 startIndex = 1; int:Unsigned8 endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed32, int:Unsigned8, unary-minus, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed32, int:Unsigned8, unary-minus, additive-expr function init() { int:Signed32 startIndex = -10; int:Unsigned8 endIndex = 2; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 13 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive Signed32 integer and value of the second expression is a byte. -Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed32, byte, additive-expr +Fail-Issue: ballerina-platform/ballerina-lang#33139 +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed32, byte, additive-expr function init() { int:Signed32 startIndex = 1; byte endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a byte. -Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed32, byte, unary-minus, additive-expr +Fail-Issue: ballerina-platform/ballerina-lang#33139 +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed32, byte, unary-minus, additive-expr function init() { int:Signed32 startIndex = -10; byte endIndex = 2; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 13 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive Signed32 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed32, int:Unsigned16, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed32, int:Unsigned16, additive-expr function init() { int:Signed32 startIndex = 1; int:Unsigned16 endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed32, int:Unsigned16, unary-minus, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed32, int:Unsigned16, unary-minus, additive-expr function init() { int:Signed32 startIndex = -10; int:Unsigned16 endIndex = 2; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 13 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive Signed32 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed32, int:Unsigned32, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed32, int:Unsigned32, additive-expr function init() { int:Signed32 startIndex = 1; int:Unsigned32 endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed32, int:Unsigned32, unary-minus, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed32, int:Unsigned32, unary-minus, additive-expr function init() { int:Signed32 startIndex = -10; int:Unsigned32 endIndex = 2; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 13 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a Unsigned8 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Unsigned8, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned8, additive-expr function init() { int:Unsigned8 startIndex = 1; int endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a Unsigned8 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, int:Unsigned8, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, int:Unsigned8, additive-expr function init() { int:Unsigned8 startIndex = 1; int:Signed8 endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a Unsigned8 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed16, int:Unsigned8, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, int:Unsigned8, additive-expr function init() { int:Unsigned8 startIndex = 1; int:Signed16 endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a Unsigned8 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed32, int:Unsigned8, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed32, int:Unsigned8, additive-expr function init() { int:Unsigned8 startIndex = 1; int:Signed32 endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a Unsigned8 integer and value of the second expression is a byte. -Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Unsigned8, byte, additive-expr +Fail-Issue: ballerina-platform/ballerina-lang#33139 +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned8, byte, additive-expr function init() { int:Unsigned8 startIndex = 1; byte endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a Unsigned8 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Unsigned8, int:Unsigned16, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned8, int:Unsigned16, additive-expr function init() { int:Unsigned8 startIndex = 1; int:Unsigned16 endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a Unsigned8 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Unsigned8, int:Unsigned32, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned8, int:Unsigned32, additive-expr function init() { int:Unsigned8 startIndex = 1; int:Unsigned32 endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a Unsigned16 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Unsigned16, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned16, additive-expr function init() { int:Unsigned16 startIndex = 1; int endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a Unsigned16 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, int:Unsigned16, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, int:Unsigned16, additive-expr function init() { int:Unsigned16 startIndex = 1; int:Signed8 endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a Unsigned16 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed16, int:Unsigned16, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, int:Unsigned16, additive-expr function init() { int:Unsigned16 startIndex = 1; int:Signed16 endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a Unsigned16 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed32, int:Unsigned16, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed32, int:Unsigned16, additive-expr function init() { int:Unsigned16 startIndex = 1; int:Signed32 endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a Unsigned16 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Unsigned8, int:Unsigned16, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned8, int:Unsigned16, additive-expr function init() { int:Unsigned16 startIndex = 1; int:Unsigned8 endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a Unsigned16 integer and value of the second expression is a byte. -Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Unsigned16, byte, additive-expr +Fail-Issue: ballerina-platform/ballerina-lang#33139 +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned16, byte, additive-expr function init() { int:Unsigned16 startIndex = 1; byte endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a Unsigned16 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Unsigned16, int:Unsigned32, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned16, int:Unsigned32, additive-expr function init() { int:Unsigned16 startIndex = 1; int:Unsigned32 endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a Unsigned32 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Unsigned32, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned32, additive-expr function init() { int:Unsigned32 startIndex = 1; int endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a Unsigned32 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, int:Unsigned32, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, int:Unsigned32, additive-expr function init() { int:Unsigned32 startIndex = 1; int:Signed8 endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a Unsigned32 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed16, int:Unsigned32, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, int:Unsigned32, additive-expr function init() { int:Unsigned32 startIndex = 1; int:Signed16 endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a Unsigned32 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed32, int:Unsigned32, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed32, int:Unsigned32, additive-expr function init() { int:Unsigned32 startIndex = 1; int:Signed32 endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a Unsigned32 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Unsigned8, int:Unsigned32, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned8, int:Unsigned32, additive-expr function init() { int:Unsigned32 startIndex = 1; int:Unsigned8 endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a Unsigned32 integer and value of the second expression is a byte. -Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Unsigned32, byte, additive-expr +Fail-Issue: ballerina-platform/ballerina-lang#33139 +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned32, byte, additive-expr function init() { int:Unsigned32 startIndex = 1; byte endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a Unsigned32 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Unsigned16, int:Unsigned32, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned16, int:Unsigned32, additive-expr function init() { int:Unsigned32 startIndex = 1; int:Unsigned16 endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) when values of both expressions are of user-defined subtypes of int. -Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-inclusive, int, DecimalNumber, singleton-type, union-type, module-type-decl, - additive-expr +Fail-Issue: ballerina-platform/ballerina-lang#33139 +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + singleton-type, union-type, module-type-decl, additive-expr type Ints 1|10; @@ -1585,78 +2003,97 @@ function init() { Ints startIndex = 1; Ints endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) when values of both expressions are of union of int subtypes. -Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-inclusive, int, DecimalNumber, int:Signed8, int:Unsigned32, union-type, additive-expr +Fail-Issue: ballerina-platform/ballerina-lang#33139 +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, int:Unsigned32, union-type, additive-expr function init() { int:Signed8|int:Unsigned32 startIndex = 1; int:Signed8|int:Unsigned32 endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) when the value of the first expression and the value of the second expression is equal. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + additive-expr function init() { int startIndex = 5; int endIndex = 5; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 1 + io:println(arr); // @output [5] } Test-Case: output Description: Test range expression (inclusive) when the value of the first expression is less than the value of the second expression. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, additive-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + additive-expr function init() { int startIndex = 5; int endIndex = 3; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 0 + io:println(arr); // @output [] } Test-Case: output Description: Test range expression (inclusive) when the types of the expressions are inferred. -Labels: range-expr, iterable-inclusive, int, DecimalNumber, additive-expr, var +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + additive-expr, var function init() { var startIndex = 1; var endIndex = 10; int count = 0; + int[] arr = []; foreach int i in startIndex ... endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test field and member access as expressions in range expression (inclusive). -Labels: range-expr, iterable-inclusive, array-type, DecimalNumber, field-access-expr, int, list-constructor, - mapping-constructor, member-access-expr, module-type-defn, record-type +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, field-access-expr, + int, DecimalNumber, mapping-constructor-expr, module-type-defn, record-type type Record record { int x; @@ -1666,17 +2103,20 @@ function init() { Record c = {x: 10}; int[] d = [30, 40]; int count = 0; + int[] arr = []; foreach int i in c.x ... d[0] { + arr[count] = i; count = count + 1; } io:println(count); // @output 21 + io:println(arr); // @output [10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30] } Test-Case: output Description: Test function and method call as expressions in range expression (inclusive). -Labels: range-expr, iterable-inclusive, DecimalNumber, int, explicit-new-expr, function-call-expr - module-class-defn, method-call-expr +Labels: range-expr, iterable-inclusive, DecimalNumber, array-type, list-constructor-expr, member-access-expr, int, + explicit-new-expr, function-call-expr, module-class-defn, method-call-expr class Class { function getInt() returns int { @@ -1687,11 +2127,14 @@ class Class { function init() { Class cls = new Class(); int count = 0; + int[] arr = []; foreach int i in cls.getInt() ... getInt() { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } function getInt() returns int { @@ -1700,142 +2143,184 @@ function getInt() returns int { Test-Case: output Description: Test type cast expression as expressions in range expression (inclusive). -Labels: range-expr, iterable-inclusive, DecimalNumber, int, type-cast-expr, additive-expr +Labels: range-expr, iterable-inclusive, DecimalNumber, array-type, list-constructor-expr, member-access-expr, int, + type-cast-expr, additive-expr function init() { int count = 0; + int[] arr = []; foreach int i in 1.0 ... 10.0 { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test unary expressions as expressions in range expression (inclusive). -Labels: range-expr, iterable-inclusive, DecimalNumber, int, unary-complement, unary-minus, unary-plus +Labels: range-expr, iterable-inclusive, DecimalNumber, array-type, list-constructor-expr, member-access-expr, int, + unary-complement, unary-minus, unary-plus function init() { int count = 0; + int[] arr = []; foreach int i in -10 ... +2 { + arr[count] = i; count = count + 1; } io:println(count); // @output 13 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2] count = 0; + arr = []; foreach int i in -10 ... ~2 { + arr[count] = i; count = count + 1; } io:println(count); // @output 8 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3] } Test-Case: output Description: Test additive expression as expressions in range expression (inclusive). -Labels: range-expr, iterable-inclusive, additive-expr, int, DecimalNumber +Labels: range-expr, iterable-inclusive, additive-expr, array-type, list-constructor-expr, member-access-expr, + int, DecimalNumber function init() { int count = 0; + int[] arr = []; foreach int i in 0+1 ... 12-2 { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test multiplicative expressions as expressions in range expression (inclusive). -Labels: range-expr, iterable-inclusive, DecimalNumber, int, multiplicative-expr +Labels: range-expr, iterable-inclusive, DecimalNumber, array-type, list-constructor-expr, member-access-expr, int, + multiplicative-expr, additive-expr function init() { int count = 0; + int[] arr = []; foreach int i in 1*2 ... 36/4 { + arr[count] = i; count = count + 1; } io:println(count); // @output 8 + io:println(arr); // @output [2,3,4,5,6,7,8,9] count = 0; + arr = []; foreach int i in 34%5 ... 4*5 { + arr[count] = i; count = count + 1; } io:println(count); // @output 17 + io:println(arr); // @output [4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20] } Test-Case: output Description: Test binary bitwise expressions as expressions in range expression (inclusive). -Labels: range-expr, iterable-inclusive, binary-bitwise-expr, DecimalNumber, int +Labels: range-expr, iterable-inclusive, binary-bitwise-expr, DecimalNumber, array-type, list-constructor-expr, + member-access-expr, int, additive-expr function init() { int count = 0; + int[] arr = []; foreach int i in (1&2) ... (4|8) { + arr[count] = i; count = count + 1; } io:println(count); // @output 13 + io:println(arr); // @output [0,1,2,3,4,5,6,7,8,9,10,11,12] count = 0; + arr = []; foreach int i in (6|3) ... (2^8) { + arr[count] = i; count = count + 1; } io:println(count); // @output 4 + io:println(arr); // @output [7,8,9,10] } Test-Case: output Description: Test checking expressions as expressions in range expression (inclusive). -Labels: range-expr, iterable-inclusive, check, checkpanic, DecimalNumber, error, int, union-type, optional-type +Labels: range-expr, iterable-inclusive, check, checkpanic, DecimalNumber, error, array-type, list-constructor-expr, + member-access-expr, int, union-type, optional-type function init() returns error? { int|error startIndex = 2; int|error endIndex = 12; int count = 0; + int[] arr = []; foreach int i in check startIndex ... checkpanic endIndex { + arr[count] = i; count = count + 1; } io:println(count); // @output 11 + io:println(arr); // @output [2,3,4,5,6,7,8,9,10,11,12] } Test-Case: output Description: Test let expression as expressions in range expression (inclusive). -Labels: range-expr, iterable-inclusive, DecimalNumber, int, let-expr +Labels: range-expr, iterable-inclusive, DecimalNumber, array-type, list-constructor-expr, member-access-expr, int, let-expr function init() { int count = 0; + int[] arr = []; foreach int i in (let int h1 = 10 in h1) ... (let int h1 = 25 in h1) { + arr[count] = i; count = count + 1; } io:println(count); // @output 16 + io:println(arr); // @output [10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25] } Test-Case: output Description: Test shift expressions as expressions in range expression (inclusive). -Labels: range-expr, iterable-inclusive, DecimalNumber, int, shift-expr +Labels: range-expr, iterable-inclusive, DecimalNumber, array-type, list-constructor-expr, member-access-expr, int, shift-expr function init() { int count = 0; + int[] arr = []; foreach int i in 1 << 2 ... 100 >> 4 { + arr[count] = i; count = count + 1; } io:println(count); // @output 3 + io:println(arr); // @output [4,5,6] } Test-Case: output Description: Test conditional expressions as expressions in range expression (inclusive). -Labels: range-expr, iterable-inclusive, conditional-expr, DecimalNumber, error, int, nil-literal, - optional-type, union-type +Labels: range-expr, iterable-inclusive, conditional-expr, DecimalNumber, error, array-type, list-constructor-expr, + member-access-expr, int, nil-literal, optional-type, union-type function init() { int|error a = 10; int? b = (); int count = 0; + int[] arr = []; foreach int i in (a is error ? 5 : a) ... (b ?: 25) { + arr[count] = i; count = count + 1; } io:println(count); // @output 16 + io:println(arr); // @output [10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25] } Test-Case: output @@ -1846,19 +2331,21 @@ function init() { int count = 0; foreach int i in int:SIGNED8_MAX_VALUE ... int:UNSIGNED8_MAX_VALUE { - count = count + 1; + count = count + i; } - io:println(count); // @output 129 + io:println(count); // @output 24639 } Test-Case: output Description: Test range expression (inclusive) with iterable object when values of both expressions are positive integers. -Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, object-type, record-type, optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + additive-expr, object-type, record-type, optional-type function init() { int startIndex = 0; int endIndex = 6; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -1868,20 +2355,23 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 7 + io:println(arr); // @output [0,1,2,3,4,5,6] } Test-Case: output Description: Test range expression (inclusive) with iterable object when values of both expressions are negative integers. -Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, object-type, record-type, - optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + additive-expr, object-type, record-type, optional-type, unary-minus function init() { int startIndex = -6; int endIndex = -1; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -1891,21 +2381,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 6 + io:println(arr); // @output [-6,-5,-4,-3,-2,-1] } Test-Case: output -Description: Test range expression (inclusive) with iterable object when the value of one expression is a +Description: Test range expression (inclusive) with iterable object when the value of one expression is a negative integer and the value of the other expression is a positive integer. -Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, object-type, record-type, - optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + additive-expr, object-type, record-type, optional-type, unary-minus function init() { int startIndex = -10; int endIndex = 20; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -1915,15 +2408,17 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 31 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20] } Test-Case: output -Description: Test range expression (inclusive) with iterable object when the value of one expression is a +Description: Test range expression (inclusive) with iterable object when the value of one expression is a negative integer and the value of the other expression is a positive integer. -Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, object-type, record-type, +Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -1939,16 +2434,16 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - count = count + 1; + count = count + i; } - io:println(count); // @output 8600048 + io:println(count); // @output -28683666993992 } Test-Case: output Description: Test range expression (inclusive) with iterable object when values of both expressions are positive Signed8 integers. -Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, int:Signed8, object-type, - record-type, optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + additive-expr, int:Signed8, object-type, record-type, optional-type function init() { int:Signed8 startIndex = 1; @@ -1962,22 +2457,26 @@ function init() { } range = startIndex ... endIndex; int count = 0; + int[] arr = []; foreach int i in range { - count += 1; + arr[count] = i; + count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) with iterable object when values of both expressions are negative Signed8 integers. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, additive-expr, object-type, - record-type, optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int:Signed8 startIndex = -10; int:Signed8 endIndex = -1; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -1987,21 +2486,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1] } Test-Case: output -Description: Test range expression (inclusive) with iterable object when the value of one expression is a +Description: Test range expression (inclusive) with iterable object when the value of one expression is a negative Signed8 integer and the value of the other expression is a positive Signed8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, additive-expr, object-type, - record-type, optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int:Signed8 startIndex = -10; int:Signed8 endIndex = 2; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -2011,21 +2513,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 13 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2] } Test-Case: output Description: Test range expression (inclusive) with iterable object when values of both expressions are positive Signed16 integers. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, object-type, - record-type, optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, additive-expr, object-type, record-type, optional-type function init() { int:Signed16 startIndex = 1; int:Signed16 endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -2035,21 +2540,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) with iterable object when values of both expressions are negative Signed16 integers. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, object-type, record-type, - optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int:Signed16 startIndex = -10; int:Signed16 endIndex = -1; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -2059,21 +2567,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1] } Test-Case: output -Description: Test range expression (inclusive) with iterable object when the value of one expression is a +Description: Test range expression (inclusive) with iterable object when the value of one expression is a negative Signed16 integer and the value of the other expression is a positive Signed16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, object-type, record-type, - optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int:Signed16 startIndex = -10; int:Signed16 endIndex = 20; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -2083,21 +2594,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 31 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20] } Test-Case: output Description: Test range expression (inclusive) with iterable object when values of both expressions are positive Signed32 integers. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, object-type, record-type, - optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed32, additive-expr, object-type, record-type, optional-type function init() { int:Signed32 startIndex = 1; int:Signed32 endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -2107,21 +2621,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) with iterable object when values of both expressions are negative Signed32 integers. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, object-type, record-type, - optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int:Signed32 startIndex = -10; int:Signed32 endIndex = -1; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -2131,21 +2648,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1] } Test-Case: output -Description: Test range expression (inclusive) with iterable object when the value of one expression is a +Description: Test range expression (inclusive) with iterable object when the value of one expression is a negative Signed32 integer and the value of the other expression is a positive Signed32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, object-type, record-type, - optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int:Signed32 startIndex = -10; int:Signed32 endIndex = 20; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -2155,21 +2675,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 31 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20] } Test-Case: output Description: Test range expression (inclusive) with iterable object when values of both expressions are Unsigned8 integers. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, additive-expr, object-type, record-type, - optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned8, additive-expr, object-type, record-type, optional-type function init() { int:Unsigned8 startIndex = 1; int:Unsigned8 endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -2179,21 +2702,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) with iterable object when values of both expressions are Unsigned16 integers. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, additive-expr, object-type, record-type, - optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned16, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int:Unsigned16 startIndex = 1; int:Unsigned16 endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -2203,21 +2729,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) with iterable object when values of both expressions are Unsigned32 integers. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, additive-expr, object-type, record-type, - optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned32, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int:Unsigned32 startIndex = 1; int:Unsigned32 endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -2227,21 +2756,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, additive-expr, object-type, record-type, - optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, additive-expr, object-type, record-type, optional-type function init() { int startIndex = 1; int:Signed8 endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -2251,21 +2783,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative integer and value of the second expression is a negative Signed8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, additive-expr, object-type, record-type, - optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int startIndex = -10; int:Signed8 endIndex = -1; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -2275,21 +2810,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, additive-expr, object-type, record-type, - optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int startIndex = -10; int:Signed8 endIndex = 2; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -2299,21 +2837,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 13 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, object-type, record-type, - optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, additive-expr, object-type, record-type, optional-type function init() { int startIndex = 1; int:Signed16 endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -2323,21 +2864,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative integer and value of the second expression is a negative Signed16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, object-type, record-type, - optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int startIndex = -10; int:Signed16 endIndex = -1; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -2347,21 +2891,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, object-type, record-type, - optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int startIndex = -10; int:Signed16 endIndex = 2; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -2371,21 +2918,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 13 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, object-type, record-type, - optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed32, additive-expr, object-type, record-type, optional-type function init() { int startIndex = 1; int:Signed32 endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -2395,21 +2945,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative integer and value of the second expression is a negative Signed32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, object-type, record-type, - optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int startIndex = -10; int:Signed32 endIndex = -1; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -2419,21 +2972,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, object-type, record-type, - optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int startIndex = -10; int:Signed32 endIndex = 2; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -2443,21 +2999,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 13 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, additive-expr, object-type, record-type, - optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned8, additive-expr, object-type, record-type, optional-type function init() { int startIndex = 1; int:Unsigned8 endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -2467,21 +3026,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, additive-expr, object-type, record-type, - optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned8, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int startIndex = -10; int:Unsigned8 endIndex = 2; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -2491,21 +3053,25 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 13 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive integer and value of the second expression is a byte. -Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, int, DecimalNumber, byte, additive-expr, object-type, record-type, optional-type +Fail-Issue: ballerina-platform/ballerina-lang#33139 +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + byte, additive-expr, object-type, record-type, optional-type function init() { int startIndex = 1; byte endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -2515,22 +3081,25 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative integer and value of the second expression is a byte. -Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, int, DecimalNumber, byte, additive-expr, object-type, record-type, - optional-type, unary-minus +Fail-Issue: ballerina-platform/ballerina-lang#33139 +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + byte, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int startIndex = -10; byte endIndex = 2; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -2540,21 +3109,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 13 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, additive-expr, object-type, - record-type, optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned16, additive-expr, object-type, record-type, optional-type function init() { int startIndex = 1; int:Unsigned16 endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -2564,21 +3136,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, additive-expr, object-type, - record-type, optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned16, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int startIndex = -10; int:Unsigned16 endIndex = 2; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -2588,21 +3163,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 13 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, additive-expr, object-type, - record-type, optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned32, additive-expr, object-type, record-type, optional-type function init() { int startIndex = 1; int:Unsigned32 endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -2612,22 +3190,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, additive-expr, object-type, - record-type, optional-type, - unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned32, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int startIndex = -10; int:Unsigned32 endIndex = 2; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -2637,21 +3217,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 13 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed8 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, additive-expr, object-type, record-type, - optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, additive-expr, object-type, record-type, optional-type function init() { int:Signed8 startIndex = 1; int endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -2661,21 +3244,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a negative integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, additive-expr, object-type, record-type, - optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int:Signed8 startIndex = -10; int endIndex = -1; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -2685,21 +3271,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, additive-expr, object-type, record-type, - optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int:Signed8 startIndex = -10; int endIndex = 2; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -2709,21 +3298,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 13 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed8 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Signed16, additive-expr, object-type, - record-type, optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, int:Signed16, additive-expr, object-type, record-type, optional-type function init() { int:Signed8 startIndex = 1; int:Signed16 endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -2733,21 +3325,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a negative Signed16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Signed16, additive-expr, object-type, - record-type, optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int:Signed8 startIndex = -10; int:Signed16 endIndex = -1; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -2757,21 +3352,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Signed16, additive-expr, object-type, - record-type, optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int:Signed8 startIndex = -10; int:Signed16 endIndex = 2; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -2781,21 +3379,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 13 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed8 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Signed32, additive-expr, object-type, - record-type, optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, int:Signed32, additive-expr, object-type, record-type, optional-type function init() { int:Signed8 startIndex = 1; int:Signed32 endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -2806,21 +3407,24 @@ function init() { foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a negative Signed32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Signed32, additive-expr, object-type, - record-type, optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int:Signed8 startIndex = -10; int:Signed32 endIndex = -1; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -2830,21 +3434,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Signed32, additive-expr, object-type, - record-type, optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int:Signed8 startIndex = -10; int:Signed32 endIndex = 2; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -2854,21 +3461,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 13 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed8 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Unsigned8, additive-expr, object-type, - record-type, optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, int:Unsigned8, additive-expr, object-type, record-type, optional-type function init() { int:Signed8 startIndex = 1; int:Unsigned8 endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -2879,21 +3489,24 @@ function init() { foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Unsigned8, additive-expr, object-type, - record-type, optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, int:Unsigned8, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int:Signed8 startIndex = -10; int:Unsigned8 endIndex = 2; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -2903,22 +3516,25 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 13 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed8 integer and value of the second expression is a byte. -Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, byte, additive-expr, object-type, record-type, - optional-type +Fail-Issue: ballerina-platform/ballerina-lang#33139 +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, byte, additive-expr, object-type, record-type, optional-type function init() { int:Signed8 startIndex = 1; byte endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -2928,22 +3544,25 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a byte. -Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, byte, additive-expr, object-type, record-type, - optional-type, unary-minus +Fail-Issue: ballerina-platform/ballerina-lang#33139 +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, byte, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int:Signed8 startIndex = -10; byte endIndex = 2; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -2953,21 +3572,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 13 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed8 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Unsigned16, additive-expr, object-type, - record-type, optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, int:Unsigned16, additive-expr, object-type, record-type, optional-type function init() { int:Signed8 startIndex = 1; int:Unsigned16 endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -2977,21 +3599,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Unsigned16, additive-expr, object-type, - record-type, optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, int:Unsigned16, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int:Signed8 startIndex = -10; int:Unsigned16 endIndex = 2; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -3001,21 +3626,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 13 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2] } Test-Case: output -Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed8 +Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed8 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Unsigned32, additive-expr, object-type, - record-type, optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, int:Unsigned32, additive-expr, object-type, record-type, optional-type function init() { int:Signed8 startIndex = 1; int:Unsigned32 endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -3025,21 +3653,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Unsigned32, additive-expr, object-type, - record-type, optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, int:Unsigned32, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int:Signed8 startIndex = -10; int:Unsigned32 endIndex = 2; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -3049,21 +3680,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 13 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed16 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, object-type, record-type, - optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, additive-expr, object-type, record-type, optional-type function init() { int:Signed16 startIndex = 1; int endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -3073,21 +3707,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a negative integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, object-type, record-type, - optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int:Signed16 startIndex = -10; int endIndex = -1; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -3097,21 +3734,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, additive-expr, object-type, record-type, - optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int:Signed16 startIndex = -10; int endIndex = 2; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -3121,21 +3761,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 13 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed16 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Signed8, additive-expr, object-type, - record-type, optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, int:Signed8, additive-expr, object-type, record-type, optional-type function init() { int:Signed16 startIndex = 1; int:Signed8 endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -3145,21 +3788,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a negative Signed8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Signed8, additive-expr, object-type, - record-type, optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int:Signed16 startIndex = -10; int:Signed8 endIndex = -1; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -3169,21 +3815,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Signed8, additive-expr, object-type, - record-type, optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int:Signed16 startIndex = -10; int:Signed8 endIndex = 2; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -3193,21 +3842,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 13 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed16 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Signed32, additive-expr, object-type, - record-type, optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, int:Signed32, additive-expr, object-type, record-type, optional-type function init() { int:Signed16 startIndex = 1; int:Signed32 endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -3217,21 +3869,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a negative Signed32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Signed32, additive-expr, object-type, - record-type, optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int:Signed16 startIndex = -10; int:Signed32 endIndex = -1; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -3241,21 +3896,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Signed32, additive-expr, object-type, - record-type, optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int:Signed16 startIndex = -10; int:Signed32 endIndex = 2; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -3265,21 +3923,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 13 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed16 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Unsigned8, additive-expr, object-type, - record-type, optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, int:Unsigned8, additive-expr, object-type, record-type, optional-type function init() { int:Signed16 startIndex = 1; int:Unsigned8 endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -3289,21 +3950,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Unsigned8, additive-expr, object-type, - record-type, optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, int:Unsigned8, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int:Signed16 startIndex = -10; int:Unsigned8 endIndex = 2; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -3313,22 +3977,25 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 13 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed16 integer and value of the second expression is a byte. -Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, byte, additive-expr, object-type, record-type, - optional-type +Fail-Issue: ballerina-platform/ballerina-lang#33139 +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, byte, additive-expr, object-type, record-type, optional-type function init() { int:Signed16 startIndex = 1; byte endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -3338,22 +4005,25 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a byte. -Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, byte, additive-expr, object-type, record-type, - optional-type, unary-minus +Fail-Issue: ballerina-platform/ballerina-lang#33139 +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, byte, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int:Signed16 startIndex = -10; byte endIndex = 2; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -3363,21 +4033,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 13 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed16 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Unsigned16, additive-expr, object-type, - record-type, optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, int:Unsigned16, additive-expr, object-type, record-type, optional-type function init() { int:Signed16 startIndex = 1; int:Unsigned16 endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -3387,21 +4060,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Unsigned16, additive-expr, object-type, - record-type, optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, int:Unsigned16, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int:Signed16 startIndex = -10; int:Unsigned16 endIndex = 2; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -3411,21 +4087,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 13 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed16 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Unsigned32, additive-expr, object-type, - record-type, optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, int:Unsigned32, additive-expr, object-type, record-type, optional-type function init() { int:Signed16 startIndex = 1; int:Unsigned32 endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -3435,21 +4114,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed16, int:Unsigned32, additive-expr, object-type, - record-type, optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed16, int:Unsigned32, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int:Signed16 startIndex = -10; int:Unsigned32 endIndex = 2; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -3459,21 +4141,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 13 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed32 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, object-type, record-type, - optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed32, additive-expr, object-type, record-type, optional-type function init() { int:Signed32 startIndex = 1; int endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -3483,21 +4168,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a negative integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, object-type, record-type, - optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int:Signed32 startIndex = -10; int endIndex = -1; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -3507,21 +4195,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, additive-expr, object-type, record-type, - optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int:Signed32 startIndex = -10; int endIndex = 2; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -3531,21 +4222,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 13 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed32 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Signed8, additive-expr, object-type, - record-type, optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed32, int:Signed8, additive-expr, object-type, record-type, optional-type function init() { int:Signed32 startIndex = 1; int:Signed8 endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -3555,21 +4249,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a negative Signed8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Signed8, additive-expr, object-type, - record-type, optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed32, int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int:Signed32 startIndex = -10; int:Signed8 endIndex = -1; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -3579,21 +4276,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Signed8, additive-expr, object-type, - record-type, optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed32, int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int:Signed32 startIndex = -10; int:Signed8 endIndex = 2; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -3603,21 +4303,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 13 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed32 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Signed16, additive-expr, object-type, - record-type, optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed32, int:Signed16, additive-expr, object-type, record-type, optional-type function init() { int:Signed32 startIndex = 1; int:Signed16 endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -3627,21 +4330,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a negative Signed16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Signed16, additive-expr, object-type, - record-type, optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed32, int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int:Signed32 startIndex = -10; int:Signed16 endIndex = -1; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -3651,21 +4357,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Signed16, additive-expr, object-type, - record-type, optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed32, int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int:Signed32 startIndex = -10; int:Signed16 endIndex = 2; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -3675,21 +4384,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 13 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed32 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Unsigned8, additive-expr, object-type, - record-type, optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed32, int:Unsigned8, additive-expr, object-type, record-type, optional-type function init() { int:Signed32 startIndex = 1; int:Unsigned8 endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -3699,21 +4411,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Unsigned8, additive-expr, object-type, - record-type, optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed32, int:Unsigned8, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int:Signed32 startIndex = -10; int:Unsigned8 endIndex = 2; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -3723,22 +4438,25 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 13 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed32 integer and value of the second expression is a byte. -Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, bye, additive-expr, object-type, record-type, - optional-type +Fail-Issue: ballerina-platform/ballerina-lang#33139 +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed32, bye, additive-expr, object-type, record-type, optional-type function init() { int:Signed32 startIndex = 1; byte endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -3748,22 +4466,25 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a byte. -Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, byte, additive-expr, object-type, record-type, - optional-type, unary-minus +Fail-Issue: ballerina-platform/ballerina-lang#33139 +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed32, byte, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int:Signed32 startIndex = -10; byte endIndex = 2; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -3773,21 +4494,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 13 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed32 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Unsigned16, additive-expr, object-type, - record-type, optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed32, int:Unsigned16, additive-expr, object-type, record-type, optional-type function init() { int:Signed32 startIndex = 1; int:Unsigned16 endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -3797,21 +4521,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Unsigned16, additive-expr, object-type, - record-type, optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed32, int:Unsigned16, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int:Signed32 startIndex = -10; int:Unsigned16 endIndex = 2; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -3821,21 +4548,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 13 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed32 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Unsigned32, additive-expr, object-type, - record-type, optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed32, int:Unsigned32, additive-expr, object-type, record-type, optional-type function init() { int:Signed32 startIndex = 1; int:Unsigned32 endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -3845,21 +4575,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed32, int:Unsigned32, additive-expr, object-type, - record-type, optional-type, unary-minus +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed32, int:Unsigned32, additive-expr, object-type, record-type, optional-type, unary-minus function init() { int:Signed32 startIndex = -10; int:Unsigned32 endIndex = 2; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -3869,21 +4602,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 13 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned8 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, additive-expr, object-type, record-type, - optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned8, additive-expr, object-type, record-type, optional-type function init() { int:Unsigned8 startIndex = 1; int endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -3893,21 +4629,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned8 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, int:Signed8, additive-expr, object-type, - record-type, optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned8, int:Signed8, additive-expr, object-type, record-type, optional-type function init() { int:Unsigned8 startIndex = 1; int:Signed8 endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -3918,21 +4657,24 @@ function init() { foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned8 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, int:Signed16, additive-expr, object-type, - record-type, optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned8, int:Signed16, additive-expr, object-type, record-type, optional-type function init() { int:Unsigned8 startIndex = 1; int:Signed16 endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -3942,21 +4684,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned8 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, int:Signed32, additive-expr, object-type, - record-type, optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned8, int:Signed32, additive-expr, object-type, record-type, optional-type function init() { int:Unsigned8 startIndex = 1; int:Signed32 endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -3966,22 +4711,25 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned8 integer and value of the second expression is a byte. -Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, byte, additive-expr, object-type, record-type, - optional-type +Fail-Issue: ballerina-platform/ballerina-lang#33139 +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned8, byte, additive-expr, object-type, record-type, optional-type function init() { int:Unsigned8 startIndex = 1; byte endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -3991,21 +4739,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned8 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, int:Unsigned16, additive-expr, object-type, - record-type, optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned8, int:Unsigned16, additive-expr, object-type, record-type, optional-type function init() { int:Unsigned8 startIndex = 1; int:Unsigned16 endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -4015,21 +4766,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned8 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned8, int:Unsigned32, additive-expr, object-type, - record-type, optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned8, int:Unsigned32, additive-expr, object-type, record-type, optional-type function init() { int:Unsigned8 startIndex = 1; int:Unsigned32 endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -4040,21 +4794,24 @@ function init() { foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned16 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, additive-expr, object-type, record-type, - optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned16, additive-expr, object-type, record-type, optional-type function init() { int:Unsigned16 startIndex = 1; int endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -4064,21 +4821,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned16 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, int:Signed8, additive-expr, object-type, - record-type, optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned16, int:Signed8, additive-expr, object-type, record-type, optional-type function init() { int:Unsigned16 startIndex = 1; int:Signed8 endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -4088,21 +4848,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned16 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, int:Signed16, additive-expr, object-type, - record-type, optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned16, int:Signed16, additive-expr, object-type, record-type, optional-type function init() { int:Unsigned16 startIndex = 1; int:Signed16 endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -4112,21 +4875,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned16 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, int:Signed32, additive-expr, object-type, - record-type, optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned16, int:Signed32, additive-expr, object-type, record-type, optional-type function init() { int:Unsigned16 startIndex = 1; int:Signed32 endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -4136,21 +4902,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned16 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, int:Unsigned8, additive-expr, object-type, - record-type, optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned16, int:Unsigned8, additive-expr, object-type, record-type, optional-type function init() { int:Unsigned16 startIndex = 1; int:Unsigned8 endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -4161,22 +4930,25 @@ function init() { foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned16 integer and value of the second expression is a byte. -Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, byte, additive-expr, object-type, record-type, - optional-type +Fail-Issue: ballerina-platform/ballerina-lang#33139 +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned16, byte, additive-expr, object-type, record-type, optional-type function init() { int:Unsigned16 startIndex = 1; byte endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -4186,21 +4958,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned16 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned16, int:Unsigned32, additive-expr, object-type, - record-type, optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned16, int:Unsigned32, additive-expr, object-type, record-type, optional-type function init() { int:Unsigned16 startIndex = 1; int:Unsigned32 endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -4210,21 +4985,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned32 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, additive-expr, object-type, record-type, - optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned32, additive-expr, object-type, record-type, optional-type function init() { int:Unsigned32 startIndex = 1; int endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -4234,21 +5012,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned32 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, int:Signed8, additive-expr, object-type, - record-type, optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned32, int:Signed8, additive-expr, object-type, record-type, optional-type function init() { int:Unsigned32 startIndex = 1; int:Signed8 endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -4258,21 +5039,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned32 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, int:Signed16, additive-expr, object-type, - record-type, optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned32, int:Signed16, additive-expr, object-type, record-type, optional-type function init() { int:Unsigned32 startIndex = 1; int:Signed16 endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -4282,21 +5066,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned32 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, int:Signed32, additive-expr, object-type, - record-type, optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned32, int:Signed32, additive-expr, object-type, record-type, optional-type function init() { int:Unsigned32 startIndex = 1; int:Signed32 endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -4306,21 +5093,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned32 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, int:Unsigned8, additive-expr, object-type, - record-type, optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned32, int:Unsigned8, additive-expr, object-type, record-type, optional-type function init() { int:Unsigned32 startIndex = 1; int:Unsigned8 endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -4330,22 +5120,25 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned32 integer and value of the second expression is a byte. -Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, byte, additive-expr, object-type, record-type, - optional-type +Fail-Issue: ballerina-platform/ballerina-lang#33139 +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned32, byte, additive-expr, object-type, record-type, optional-type function init() { int:Unsigned32 startIndex = 1; byte endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -4355,21 +5148,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned32 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-object, int, DecimalNumber, int:Unsigned32, int:Unsigned16, additive-expr, object-type, - record-type, optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Unsigned32, int:Unsigned16, additive-expr, object-type, record-type, optional-type function init() { int:Unsigned32 startIndex = 1; int:Unsigned16 endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -4379,17 +5175,19 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) with iterable object when values of both expressions are of user-defined subtypes of int. -Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, int, DecimalNumber, singleton-type, union-type, module-type-decl, - additive-expr, object-type, record-type, optional-type +Fail-Issue: ballerina-platform/ballerina-lang#33139 +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + singleton-type, union-type, module-type-decl, additive-expr, object-type, record-type, optional-type type Ints 1|10; @@ -4397,6 +5195,7 @@ function init() { Ints startIndex = 1; Ints endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -4406,22 +5205,25 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) with iterable object when values of both expressions are of union of int subtypes. -Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, int, DecimalNumber, int:Signed8, int:Unsigned32, union-type, additive-expr, - object-type, record-type, optional-type +Fail-Issue: ballerina-platform/ballerina-lang#33139 +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + int:Signed8, int:Unsigned32, union-type, additive-expr, object-type, record-type, optional-type function init() { int:Signed8|int:Unsigned32 startIndex = 1; int:Signed8|int:Unsigned32 endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -4431,20 +5233,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) with iterable object when the value of the first expression and the value of the second expression is equal. -Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, object-type, record-type, optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + additive-expr, object-type, record-type, optional-type function init() { int startIndex = 5; int endIndex = 5; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -4454,20 +5260,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 1 + io:println(arr); // @output [5] } Test-Case: output Description: Test range expression (inclusive) when the value of the first expression is less than the value of the second expression. -Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, object-type, record-type, optional-type +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + additive-expr, object-type, record-type, optional-type function init() { int startIndex = 5; int endIndex = 3; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -4477,20 +5287,24 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 0 + io:println(arr); // @output [] } Test-Case: output Description: Test range expression (inclusive) with iterable object when the types of the values of the expressions are inferred. -Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, object-type, record-type, optional-type, var +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + additive-expr, object-type, record-type, optional-type, var function init() { var startIndex = 1; var endIndex = 10; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -4500,32 +5314,39 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) when the types of the values of the expressions and type of the range expression are inferred. -Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, var +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + additive-expr, var function init() { int startIndex = 1; int endIndex = 10; int count = 0; + int[] arr = []; var range = startIndex ... endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) at module level. -Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, object-type, record-type, optional-type, var +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + additive-expr, object-type, record-type, optional-type, var int startIndex = 1; int endIndex = 10; @@ -4539,16 +5360,20 @@ object { function init() { int count = 0; + int[] arr = []; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test range expression (inclusive) at module level. -Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, var +Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + additive-expr, var int startIndex = 1; int endIndex = 10; @@ -4557,16 +5382,20 @@ var range = startIndex ... endIndex; function init() { int count = 0; + int[] arr = []; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test iterable object returned by the range expression (inclusive). -Labels: range-expr, int, DecimalNumber, object-type, optional-type, var, value:toBalString, method-call-expr +Labels: range-expr, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, object-type, + optional-type, var, value:toBalString, method-call-expr function init() { object { @@ -4596,8 +5425,9 @@ function init() { Test-Case: output Description: Test field and member access as expressions in range expression (inclusive). -Labels: range-expr, iterable-object, additive-expr, array-type, DecimalNumber, field-access-expr, int, list-constructor, - mapping-constructor, member-access-expr, module-type-defn, object-type, record-type, optional-type +Labels: range-expr, iterable-object, additive-expr, array-type, list-constructor-expr, member-access-expr, + field-access-expr, DecimalNumber, int, mapping-constructor-expr, module-type-defn, object-type, + record-type, optional-type type Record record { int x; @@ -4607,6 +5437,7 @@ function init() { Record c = {x: 10}; int[] d = [30, 40]; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -4616,15 +5447,18 @@ function init() { } range = c.x ... d[0]; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 21 + io:println(arr); // @output [10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30] } Test-Case: output Description: Test function and method call as expressions in range expression (inclusive). -Labels: range-expr, iterable-object, DecimalNumber, int, explicit-new-expr, function-call-expr - module-class-defn, method-call-expr, additive-expr, object-type, record-type, optional-type +Labels: range-expr, iterable-object, DecimalNumber, array-type, list-constructor-expr, member-access-expr, int, + explicit-new-expr, function-call-expr, module-class-defn, method-call-expr, additive-expr, object-type, + record-type, optional-type class Class { function getInt() returns int { @@ -4635,6 +5469,7 @@ class Class { function init() { Class cls = new Class(); int count = 0; + int[] arr = []; object { *object:Iterable; @@ -4644,9 +5479,11 @@ function init() { } range = cls.getInt() ... getInt(); foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } function getInt() returns int { @@ -4655,11 +5492,12 @@ function getInt() returns int { Test-Case: output Description: Test type cast expression as expressions in range expression (inclusive). -Labels: range-expr, iterable-object, DecimalNumber, int, type-cast-expr, additive-expr, object-type, record-type, - optional-type +Labels: range-expr, iterable-object, DecimalNumber, array-type, list-constructor-expr, member-access-expr, + int, type-cast-expr, additive-expr, object-type, record-type, optional-type function init() { int count = 0; + int[] arr = []; object { *object:Iterable; @@ -4669,18 +5507,21 @@ function init() { } range = 1.0 ... 10.0; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test unary expressions as expressions in range expression (inclusive). -Labels: range-expr, iterable-object, DecimalNumber, int, unary-complement, unary-minus, unary-plus, additive-expr, - object-type, record-type, optional-type +Labels: range-expr, iterable-object, DecimalNumber, array-type, list-constructor-expr, member-access-expr, int, + unary-complement, unary-minus, unary-plus, additive-expr, object-type, record-type, optional-type function init() { int count = 0; + int[] arr = []; object { *object:Iterable; @@ -4690,25 +5531,32 @@ function init() { } range = -10 ... +2; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 13 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2] count = 0; + arr = []; range = -10 ... ~2; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 8 + io:println(arr); // @output [-10,-9,-8,-7,-6,-5,-4,-3] } Test-Case: output Description: Test additive expression as expressions in range expression (inclusive). -Labels: range-expr, iterable-object, additive-expr, int, DecimalNumber, object-type, record-type, optional-type +Labels: range-expr, iterable-object, additive-expr, array-type, list-constructor-expr, member-access-expr, int, + DecimalNumber, object-type, record-type, optional-type function init() { int count = 0; + int[] arr = []; object { *object:Iterable; @@ -4718,18 +5566,21 @@ function init() { } range = 0+1 ... 12-2; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } Test-Case: output Description: Test multiplicative expressions as expressions in range expression (inclusive). -Labels: range-expr, iterable-object, additive-expr, DecimalNumber, int, multiplicative-expr, object-type, record-type, - optional-type +Labels: range-expr, iterable-object, additive-expr, DecimalNumber, array-type, list-constructor-expr, member-access-expr, + int, multiplicative-expr, object-type, record-type, optional-type function init() { int count = 0; + int[] arr = []; object { *object:Iterable; @@ -4739,26 +5590,32 @@ function init() { } range = 1*2 ... 36/4; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 8 + io:println(arr); // @output [2,3,4,5,6,7,8,9] count = 0; + arr = []; range = 34%5 ... 4*5; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 17 + io:println(arr); // @output [4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20] } Test-Case: output Description: Test binary bitwise expressions as expressions in range expression (inclusive). -Labels: range-expr, iterable-object, binary-bitwise-expr, DecimalNumber, int, additive-expr, object-type, record-type, - optional-type +Labels: range-expr, iterable-object, binary-bitwise-expr, DecimalNumber, array-type, list-constructor-expr, + member-access-expr, int, additive-expr, object-type, record-type, optional-type function init() { int count = 0; + int[] arr = []; object { *object:Iterable; @@ -4768,28 +5625,34 @@ function init() { } range = (1&2) ... (4|8); foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 13 + io:println(arr); // @output [0,1,2,3,4,5,6,7,8,9,10,11,12] count = 0; + arr = []; range = (6|3) ... (2^8); foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 4 + io:println(arr); // @output [7,8,9,10] } Test-Case: output Description: Test checking expressions as expressions in range expression (inclusive). -Labels: range-expr, iterable-object, check, checkpanic, DecimalNumber, error, int, union-type, additive-expr, - object-type, record-type, optional-type +Labels: range-expr, iterable-object, check, checkpanic, DecimalNumber, error, array-type, list-constructor-expr, + member-access-expr, int, union-type, additive-expr, object-type, record-type, optional-type function init() returns error? { int|error startIndex = 2; int|error endIndex = 12; int count = 0; + int[] arr = []; object { *object:Iterable; @@ -4799,17 +5662,21 @@ function init() returns error? { } range = check startIndex ... checkpanic endIndex; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 11 + io:println(arr); // @output [2,3,4,5,6,7,8,9,10,11,12] } Test-Case: output Description: Test let expression as expressions in range expression (inclusive). -Labels: range-expr, iterable-object, DecimalNumber, int, let-expr, additive-expr, object-type, record-type, optional-type +Labels: range-expr, iterable-object, DecimalNumber, array-type, list-constructor-expr, member-access-expr, + int, let-expr, additive-expr, object-type, record-type, optional-type function init() { int count = 0; + int[] arr = []; object { *object:Iterable; @@ -4819,18 +5686,21 @@ function init() { } range = (let int h1 = 10 in h1) ... (let int h1 = 25 in h1); foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 16 + io:println(arr); // @output [10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25] } Test-Case: output Description: Test shift expressions as expressions in range expression (inclusive). -Labels: range-expr, iterable-object, DecimalNumber, int, shift-expr, additive-expr, object-type, record-type, - optional-type +Labels: range-expr, iterable-object, DecimalNumber, array-type, list-constructor-expr, member-access-expr, + int, shift-expr, additive-expr, object-type, record-type, optional-type function init() { int count = 0; + int[] arr = []; object { *object:Iterable; @@ -4840,20 +5710,23 @@ function init() { } range = 1<<2 ... 100>>4; foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 3 + io:println(arr); // @output [4,5,6] } Test-Case: output Description: Test conditional expressions as expressions in range expression (inclusive). -Labels: range-expr, iterable-object, conditional-expr, additive-expr, DecimalNumber, error, int, nil-literal, - optional-type, union-type, object-type, record-type +Labels: range-expr, iterable-object, conditional-expr, additive-expr, DecimalNumber, error, array-type, + list-constructor-expr, member-access-expr, int, nil-literal, optional-type, union-type, object-type, record-type function init() { int|error a = 10; int? b = (); int count = 0; + int[] arr = []; object { *object:Iterable; @@ -4863,9 +5736,11 @@ function init() { } range = (a is error ? 5 : a) ... (b ?: 25); foreach int i in range { + arr[count] = i; count = count + 1; } io:println(count); // @output 16 + io:println(arr); // @output [10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25] } Test-Case: output @@ -4884,25 +5759,28 @@ function init() { } range = int:SIGNED8_MAX_VALUE ... int:UNSIGNED8_MAX_VALUE; foreach int i in range { - count = count + 1; + count = count + i; } - io:println(count); // @output 129 + io:println(count); // @output 24639 } Test-Case: output Description: Test isolatedness of range expression (inclusive). Fail-Issue: ballerina-platform/ballerina-lang#33163 -Labels: range-expr, iterable-object, object-type, additive-expr, int, DecimalNumber, function-call-expr, record-type, - optional-type, lock-stmt +Labels: range-expr, iterable-object, object-type, additive-expr, array-type, list-constructor-expr, member-access-expr, + int, DecimalNumber, function-call-expr, record-type, optional-type, lock-stmt -isolated int i = 1; +isolated int j = 1; function init() { int count = 0; + int[] arr = []; foreach int i in getRange() { + arr[count] = i; count = count + 1; } io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } function getRange() returns object { @@ -4912,14 +5790,15 @@ function getRange() returns object { }; } { lock { - return i ... i + 9; + return j ... j + 9; } } Test-Case: output -Description: Test isolatedness of range expression (inclusive). +Description: Test isolatedness of the resultant object of the range expression (inclusive). Fail-Issue: ballerina-platform/ballerina-lang#33163 -Labels: range-expr, object-type, record-type, int, optional-type, is-expr, any, type-cast-expr +Labels: range-expr, object-type, record-type, array-type, list-constructor-expr, member-access-expr, int, + optional-type, is-expr, any, type-cast-expr function init() { object { @@ -4933,9 +5812,10 @@ function init() { } Test-Case: output -Description: Test isolatedness of range expression (inclusive). +Description: Test isolatedness of the iterator() and next() methods of range expression (inclusive). Fail-Issue: ballerina-platform/ballerina-lang#33163 -Labels: range-expr, object-type, int, DecimalNumber, record-type, optional-type, is-expr, method-call-expr +Labels: range-expr, object-type, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, + record-type, optional-type, is-expr, method-call-expr function init() { object { @@ -4951,7 +5831,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with query expression. -Labels: range-expr, iterable-inclusive, array-type, int, DecimalNumber, query-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, array-type, + list-constructor-expr, member-access-expr, int, DecimalNumber, query-expr function init() { int[] a = from int i in 1 ... 10 From daf84b69a9d162239271f0d9834af7fac25846f5 Mon Sep 17 00:00:00 2001 From: lasinicl Date: Sun, 17 Oct 2021 18:13:40 +0530 Subject: [PATCH 05/14] Update tests with array:push --- .../range-expr/range_expr_exclusive.balt | 994 ++++++++-------- .../range-expr/range_expr_inclusive.balt | 1006 ++++++++--------- 2 files changed, 1000 insertions(+), 1000 deletions(-) diff --git a/conformance/lang/expressions/range-expr/range_expr_exclusive.balt b/conformance/lang/expressions/range-expr/range_expr_exclusive.balt index 4d966ccc..7fbbb41f 100644 --- a/conformance/lang/expressions/range-expr/range_expr_exclusive.balt +++ b/conformance/lang/expressions/range-expr/range_expr_exclusive.balt @@ -1,6 +1,6 @@ Test-Case: output Description: Test range expression (exclusive) when values of both expressions are positive integers. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, additive-expr function init() { @@ -9,7 +9,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 6 @@ -18,7 +18,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when values of both expressions are negative integers. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, unary-minus, additive-expr function init() { @@ -27,7 +27,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 5 @@ -37,7 +37,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when the value of one expression is a negative integer and the value of the other expression is a positive integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, unary-minus, additive-expr function init() { @@ -46,7 +46,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 30 @@ -70,7 +70,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when values of both expressions are positive Signed8 integers. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, int:Signed8, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, additive-expr function init() { int:Signed8 startIndex = 1; @@ -87,7 +87,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when values of both expressions are negative Signed8 integers. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, unary-minus, additive-expr function init() { @@ -96,7 +96,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -106,7 +106,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when the value of one expression is a negative Signed8 integer and the value of the other expression is a positive Signed8 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, unary-minus, additive-expr function init() { @@ -115,7 +115,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 30 @@ -124,7 +124,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when values of both expressions are positive Signed16 integers. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, additive-expr function init() { @@ -133,7 +133,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -142,7 +142,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when values of both expressions are negative Signed16 integers. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, unary-minus, additive-expr function init() { @@ -151,7 +151,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -161,7 +161,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when the value of one expression is a negative Signed16 integer and the value of the other expression is a positive Signed16 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, unary-minus, additive-expr function init() { @@ -170,7 +170,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 30 @@ -179,7 +179,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when values of both expressions are positive Signed32 integers. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed32, additive-expr function init() { @@ -188,7 +188,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -197,7 +197,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when values of both expressions are negative Signed32 integers. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed32, unary-minus, additive-expr function init() { @@ -206,7 +206,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -216,7 +216,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when the value of one expression is a negative Signed32 integer and the value of the other expression is a positive Signed32 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed32, unary-minus, additive-expr function init() { @@ -225,7 +225,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 30 @@ -234,7 +234,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when values of both expressions are Unsigned8 integers. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned8, additive-expr function init() { @@ -243,7 +243,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -252,7 +252,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when values of both expressions are Unsigned16 integers. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned16, additive-expr function init() { @@ -261,7 +261,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -270,7 +270,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when values of both expressions are Unsigned32 integers. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned32, additive-expr function init() { @@ -279,7 +279,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -289,7 +289,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, additive-expr function init() { @@ -298,7 +298,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -308,7 +308,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative integer and value of the second expression is a negative Signed8 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, unary-minus, additive-expr function init() { @@ -317,7 +317,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -327,7 +327,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, unary-minus, additive-expr function init() { @@ -336,7 +336,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -346,7 +346,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, additive-expr function init() { @@ -355,7 +355,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -365,7 +365,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative integer and value of the second expression is a negative Signed16 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, unary-minus, additive-expr function init() { @@ -374,7 +374,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -384,7 +384,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, unary-minus, additive-expr function init() { @@ -393,7 +393,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -403,7 +403,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed32, additive-expr function init() { @@ -412,7 +412,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -422,7 +422,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative integer and value of the second expression is a negative Signed32 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed32, unary-minus, additive-expr function init() { @@ -431,7 +431,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -441,7 +441,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed32, unary-minus, additive-expr function init() { @@ -450,7 +450,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -460,7 +460,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned8, additive-expr function init() { @@ -469,7 +469,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -479,7 +479,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned8, unary-minus, additive-expr function init() { @@ -488,7 +488,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -499,7 +499,7 @@ Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, byte, additive-expr function init() { @@ -508,7 +508,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -519,7 +519,7 @@ Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, byte, unary-minus, additive-expr function init() { @@ -528,7 +528,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -538,7 +538,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned16, additive-expr function init() { @@ -547,7 +547,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -557,7 +557,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned16, unary-minus, additive-expr function init() { @@ -566,7 +566,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -576,7 +576,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned32, additive-expr function init() { @@ -585,7 +585,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -595,7 +595,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned32, unary-minus, additive-expr function init() { @@ -604,7 +604,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -614,7 +614,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive Signed8 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, additive-expr function init() { @@ -623,7 +623,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -633,7 +633,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a negative integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, unary-minus, additive-expr function init() { @@ -642,7 +642,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -652,7 +652,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, unary-minus, additive-expr function init() { @@ -661,7 +661,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -671,7 +671,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive Signed8 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, int:Signed16, additive-expr function init() { @@ -680,7 +680,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -690,7 +690,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a negative Signed16 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, int:Signed16, unary-minus, additive-expr function init() { @@ -699,7 +699,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -709,7 +709,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, int:Signed16, unary-minus, additive-expr function init() { @@ -718,7 +718,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -728,7 +728,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive Signed8 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, int:Signed32, additive-expr function init() { @@ -737,7 +737,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -747,7 +747,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a negative Signed32 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, int:Signed32, unary-minus, additive-expr function init() { @@ -756,7 +756,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -766,7 +766,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, int:Signed32, unary-minus, additive-expr function init() { @@ -775,7 +775,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -785,7 +785,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive Signed8 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, int:Unsigned8, additive-expr function init() { @@ -794,7 +794,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -804,7 +804,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, int:Unsigned8, unary-minus, additive-expr function init() { @@ -813,7 +813,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -824,7 +824,7 @@ Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive Signed8 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, byte, additive-expr function init() { @@ -833,7 +833,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -844,7 +844,7 @@ Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, byte, unary-minus, additive-expr function init() { @@ -853,7 +853,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -863,7 +863,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive Signed8 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, int:Unsigned16, additive-expr function init() { @@ -872,7 +872,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -882,7 +882,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, int:Unsigned16, unary-minus, additive-expr function init() { @@ -891,7 +891,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -901,7 +901,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive Signed8 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, int:Unsigned32, additive-expr function init() { @@ -910,7 +910,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -920,7 +920,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, int:Unsigned32, unary-minus, additive-expr function init() { @@ -929,7 +929,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -939,7 +939,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive Signed16 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, additive-expr function init() { @@ -948,7 +948,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -958,7 +958,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a negative integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, unary-minus, additive-expr function init() { @@ -967,7 +967,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -977,7 +977,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, unary-minus, additive-expr function init() { @@ -986,7 +986,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -996,7 +996,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive Signed16 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, int:Signed16, additive-expr function init() { @@ -1005,7 +1005,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -1015,7 +1015,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a negative Signed8 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, int:Signed16, unary-minus, additive-expr function init() { @@ -1024,7 +1024,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -1034,7 +1034,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, int:Signed16, unary-minus, additive-expr function init() { @@ -1043,7 +1043,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -1053,7 +1053,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive Signed16 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, int:Signed32, additive-expr function init() { @@ -1062,7 +1062,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -1072,7 +1072,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a negative Signed32 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, int:Signed32, unary-minus, additive-expr function init() { @@ -1081,7 +1081,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -1091,7 +1091,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, int:Signed32, unary-minus, additive-expr function init() { @@ -1100,7 +1100,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -1110,7 +1110,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive Signed16 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, int:Unsigned8, additive-expr function init() { @@ -1119,7 +1119,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -1129,7 +1129,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, int:Unsigned8, unary-minus, additive-expr function init() { @@ -1138,7 +1138,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -1149,7 +1149,7 @@ Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive Signed16 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, byte, additive-expr function init() { @@ -1158,7 +1158,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -1169,7 +1169,7 @@ Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, byte, unary-minus, additive-expr function init() { @@ -1178,7 +1178,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -1188,7 +1188,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive Signed16 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, int:Unsigned16, additive-expr function init() { @@ -1197,7 +1197,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -1207,7 +1207,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, int:Unsigned16, unary-minus, additive-expr function init() { @@ -1216,7 +1216,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -1226,7 +1226,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive Signed16 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, int:Unsigned32, additive-expr function init() { @@ -1235,7 +1235,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -1245,7 +1245,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, int:Unsigned32, unary-minus, additive-expr function init() { @@ -1254,7 +1254,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -1264,7 +1264,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive Signed32 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed32, additive-expr function init() { @@ -1273,7 +1273,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -1283,7 +1283,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a negative integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed32, unary-minus, additive-expr function init() { @@ -1292,7 +1292,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -1302,7 +1302,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed32, unary-minus, additive-expr function init() { @@ -1311,7 +1311,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -1321,7 +1321,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive Signed32 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, int:Signed32, additive-expr function init() { @@ -1330,7 +1330,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -1340,7 +1340,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a negative Signed8 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, int:Signed32, unary-minus, additive-expr function init() { @@ -1349,7 +1349,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -1359,7 +1359,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, int:Signed32, unary-minus, additive-expr function init() { @@ -1368,7 +1368,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -1378,7 +1378,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive Signed32 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, int:Signed32, additive-expr function init() { @@ -1387,7 +1387,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -1397,7 +1397,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a negative Signed16 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, int:Signed32, unary-minus, additive-expr function init() { @@ -1406,7 +1406,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -1416,7 +1416,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, int:Signed32, unary-minus, additive-expr function init() { @@ -1425,7 +1425,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -1435,7 +1435,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive Signed32 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed32, int:Unsigned8, additive-expr function init() { @@ -1444,7 +1444,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -1454,7 +1454,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed32, int:Unsigned8, unary-minus, additive-expr function init() { @@ -1463,7 +1463,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -1474,7 +1474,7 @@ Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive Signed32 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed32, byte, additive-expr function init() { @@ -1483,7 +1483,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -1494,7 +1494,7 @@ Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed32, byte, unary-minus, additive-expr function init() { @@ -1503,7 +1503,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -1513,7 +1513,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive Signed32 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed32, int:Unsigned16, additive-expr function init() { @@ -1522,7 +1522,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -1532,7 +1532,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed32, int:Unsigned16, unary-minus, additive-expr function init() { @@ -1541,7 +1541,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -1551,7 +1551,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive Signed32 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed32, int:Unsigned32, additive-expr function init() { @@ -1560,7 +1560,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -1570,7 +1570,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed32, int:Unsigned32, unary-minus, additive-expr function init() { @@ -1579,7 +1579,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -1589,7 +1589,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a Unsigned8 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned8, additive-expr function init() { @@ -1598,7 +1598,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -1608,7 +1608,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a Unsigned8 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, int:Unsigned8, additive-expr function init() { @@ -1617,7 +1617,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -1627,7 +1627,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a Unsigned8 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, int:Unsigned8, additive-expr function init() { @@ -1636,7 +1636,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -1646,7 +1646,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a Unsigned8 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed32, int:Unsigned8, additive-expr function init() { @@ -1655,7 +1655,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -1666,7 +1666,7 @@ Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a Unsigned8 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned8, byte, additive-expr function init() { @@ -1675,7 +1675,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -1685,7 +1685,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a Unsigned8 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned8, int:Unsigned16, additive-expr function init() { @@ -1694,7 +1694,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -1704,7 +1704,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a Unsigned8 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned8, int:Unsigned32, additive-expr function init() { @@ -1713,7 +1713,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -1723,7 +1723,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a Unsigned16 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned16, additive-expr function init() { @@ -1732,7 +1732,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -1742,7 +1742,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a Unsigned16 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, int:Unsigned16, additive-expr function init() { @@ -1751,7 +1751,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -1761,7 +1761,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a Unsigned16 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, int:Unsigned16, additive-expr function init() { @@ -1770,7 +1770,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -1780,7 +1780,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a Unsigned16 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed32, int:Unsigned16, additive-expr function init() { @@ -1789,7 +1789,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -1799,7 +1799,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a Unsigned16 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned8, int:Unsigned16, additive-expr function init() { @@ -1808,7 +1808,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -1819,7 +1819,7 @@ Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a Unsigned16 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned16, byte, additive-expr function init() { @@ -1828,7 +1828,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -1838,7 +1838,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a Unsigned16 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned16, int:Unsigned32, additive-expr function init() { @@ -1847,7 +1847,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -1857,7 +1857,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a Unsigned32 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned32, additive-expr function init() { @@ -1866,7 +1866,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -1876,7 +1876,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a Unsigned32 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, int:Unsigned32, additive-expr function init() { @@ -1885,7 +1885,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -1895,7 +1895,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a Unsigned32 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, int:Unsigned32, additive-expr function init() { @@ -1904,7 +1904,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -1914,7 +1914,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a Unsigned32 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed32, int:Unsigned32, additive-expr function init() { @@ -1923,7 +1923,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -1933,7 +1933,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a Unsigned32 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned8, int:Unsigned32, additive-expr function init() { @@ -1942,7 +1942,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -1953,7 +1953,7 @@ Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a Unsigned32 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned32, byte, additive-expr function init() { @@ -1962,7 +1962,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -1972,7 +1972,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a Unsigned32 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned16, int:Unsigned32, additive-expr function init() { @@ -1981,7 +1981,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -1991,7 +1991,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when values of both expressions are of user-defined subtypes of int. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, singleton-type, union-type, module-type-decl, additive-expr type Ints 1|10; @@ -2002,7 +2002,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -2012,7 +2012,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when values of both expressions are of union of int subtypes. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, int:Unsigned32, union-type, additive-expr function init() { @@ -2021,7 +2021,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -2031,7 +2031,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when the value of the first expression and the value of the second expression is equal. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, additive-expr function init() { int startIndex = 5; @@ -2040,7 +2040,7 @@ function init() { int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 0 @@ -2050,7 +2050,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when the value of the first expression is less than the value of the second expression. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, additive-expr function init() { int startIndex = 5; @@ -2059,7 +2059,7 @@ function init() { int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 0 @@ -2068,7 +2068,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when the types expressions are inferred. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, additive-expr, var function init() { @@ -2078,7 +2078,7 @@ function init() { int[] arr = []; foreach int i in startIndex ..< endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -2087,8 +2087,8 @@ function init() { Test-Case: output Description: Test field and member access as expressions in range expression (exclusive). -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, member-access-expr, field-access-expr, - DecimalNumber, int, mapping-constructor-expr, module-type-defn, record-type, additive-expr +Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, field-access-expr, + DecimalNumber, int, mapping-constructor-expr, member-access-expr, module-type-defn, record-type, additive-expr type Record record { int x; @@ -2101,7 +2101,7 @@ function init() { int[] arr = []; foreach int i in c.x ..< d[0] { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 20 @@ -2110,7 +2110,7 @@ function init() { Test-Case: output Description: Test function and method call as expressions in range expression (exclusive). -Labels: range-expr, iterable-exclusive, DecimalNumber, array-type, list-constructor-expr, member-access-expr, +Labels: range-expr, iterable-exclusive, DecimalNumber, array-type, list-constructor-expr, array:push, int, explicit-new-expr, function-call-expr, module-class-defn, method-call-expr, additive-expr class Class { @@ -2125,7 +2125,7 @@ function init() { int[] arr = []; foreach int i in cls.getInt() ..< getInt() { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -2138,7 +2138,7 @@ function getInt() returns int { Test-Case: output Description: Test type cast expression as expressions in range expression (exclusive). -Labels: range-expr, iterable-exclusive, DecimalNumber, array-type, list-constructor-expr, member-access-expr, +Labels: range-expr, iterable-exclusive, DecimalNumber, array-type, list-constructor-expr, array:push, int, type-cast-expr, additive-expr function init() { @@ -2146,7 +2146,7 @@ function init() { int[] arr = []; foreach int i in 1.0 ..< 10.0 { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -2155,7 +2155,7 @@ function init() { Test-Case: output Description: Test unary expressions as expressions in range expression (exclusive). -Labels: range-expr, iterable-exclusive, DecimalNumber, array-type, list-constructor-expr, member-access-expr, int, +Labels: range-expr, iterable-exclusive, DecimalNumber, array-type, list-constructor-expr, array:push, int, unary-complement, unary-minus, unary-plus, additive-expr function init() { @@ -2163,7 +2163,7 @@ function init() { int[] arr = []; foreach int i in -10 ..< +2 { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -2172,7 +2172,7 @@ function init() { count = 0; arr = []; foreach int i in -10 ..< ~2 { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 7 @@ -2181,7 +2181,7 @@ function init() { Test-Case: output Description: Test additive expression as expressions in range expression (exclusive). -Labels: range-expr, iterable-exclusive, additive-expr, array-type, list-constructor-expr, member-access-expr, +Labels: range-expr, iterable-exclusive, additive-expr, array-type, list-constructor-expr, array:push, int, DecimalNumber function init() { @@ -2189,7 +2189,7 @@ function init() { int[] arr = []; foreach int i in 0+1 ..< 12-2 { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -2198,7 +2198,7 @@ function init() { Test-Case: output Description: Test multiplicative expressions as expressions in range expression (exclusive). -Labels: range-expr, iterable-exclusive, DecimalNumber, array-type, list-constructor-expr, member-access-expr, int, +Labels: range-expr, iterable-exclusive, DecimalNumber, array-type, list-constructor-expr, array:push, int, multiplicative-expr, additive-expr function init() { @@ -2206,7 +2206,7 @@ function init() { int[] arr = []; foreach int i in 1*2 ..< 36/4 { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 7 @@ -2215,7 +2215,7 @@ function init() { count = 0; arr = []; foreach int i in 34%5 ..< 4*5 { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 16 @@ -2225,14 +2225,14 @@ function init() { Test-Case: output Description: Test binary bitwise expressions as expressions in range expression (exclusive). Labels: range-expr, iterable-exclusive, binary-bitwise-expr, DecimalNumber, array-type, list-constructor-expr, - member-access-expr, int, additive-expr + array:push, int, additive-expr function init() { int count = 0; int[] arr = []; foreach int i in (1&2) ..< (4|8) { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -2241,7 +2241,7 @@ function init() { count = 0; arr = []; foreach int i in (6|3) ..< (2^8) { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 3 @@ -2251,7 +2251,7 @@ function init() { Test-Case: output Description: Test checking expressions as expressions in range expression (exclusive). Labels: range-expr, iterable-exclusive, check, checkpanic, DecimalNumber, error, array-type, list-constructor-expr, - member-access-expr, int, union-type, optional-type, additive-expr + array:push, int, union-type, optional-type, additive-expr function init() returns error? { int|error startIndex = 2; @@ -2260,7 +2260,7 @@ function init() returns error? { int[] arr = []; foreach int i in check startIndex ..< checkpanic endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -2276,7 +2276,7 @@ function init() { int[] arr = []; foreach int i in (let int h1 = 10 in h1) ..< (let int h1 = 25 in h1) { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 15 @@ -2292,7 +2292,7 @@ function init() { int[] arr = []; foreach int i in 1 << 2 ..< 100 >> 4 { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 2 @@ -2302,7 +2302,7 @@ function init() { Test-Case: output Description: Test conditional expressions as expressions in range expression (exclusive). Labels: range-expr, iterable-exclusive, conditional-expr, DecimalNumber, error, array-type, list-constructor-expr, - member-access-expr, int, nil-literal, optional-type, union-type, additive-expr + array:push, int, nil-literal, optional-type, union-type, additive-expr function init() { int|error a = 10; @@ -2311,7 +2311,7 @@ function init() { int[] arr = []; foreach int i in (a is error ? 5 : a) ..< (b ?: 25) { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 15 @@ -2334,7 +2334,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when values of both expressions are positive integers. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, additive-expr, object-type, record-type, optional-type function init() { @@ -2351,7 +2351,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 6 @@ -2361,7 +2361,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when values of both expressions are negative integers. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -2378,7 +2378,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 5 @@ -2388,7 +2388,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when the value of one expression is a negative integer and the value of the other expression is a positive integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -2405,7 +2405,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 30 @@ -2439,7 +2439,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when values of both expressions are positive Signed8 integers. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, additive-expr, int:Signed8, additive-expr, object-type, record-type, optional-type function init() { @@ -2466,7 +2466,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when values of both expressions are negative Signed8 integers. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -2483,7 +2483,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -2493,7 +2493,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when the value of one expression is a negative Signed8 integer and the value of the other expression is a positive Signed8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -2510,7 +2510,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -2520,7 +2520,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when values of both expressions are positive Signed16 integers. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, additive-expr, object-type, record-type, optional-type function init() { @@ -2537,7 +2537,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -2547,7 +2547,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when values of both expressions are negative Signed16 integers. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -2564,7 +2564,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -2574,7 +2574,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when the value of one expression is a negative Signed16 integer and the value of the other expression is a positive Signed16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -2591,7 +2591,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 30 @@ -2601,7 +2601,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when values of both expressions are positive Signed32 integers. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed32, additive-expr, object-type, record-type, optional-type function init() { @@ -2618,7 +2618,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -2628,7 +2628,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when values of both expressions are negative Signed32 integers. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -2645,7 +2645,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -2655,7 +2655,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when the value of one expression is a negative Signed32 integer and the value of the other expression is a positive Signed32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -2672,7 +2672,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 30 @@ -2682,7 +2682,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when values of both expressions are Unsigned8 integers. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned8, additive-expr, object-type, record-type, optional-type function init() { @@ -2699,7 +2699,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -2709,7 +2709,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when values of both expressions are Unsigned16 integers. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned16, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -2726,7 +2726,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -2736,7 +2736,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when values of both expressions are Unsigned32 integers. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned32, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -2753,7 +2753,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -2763,7 +2763,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, additive-expr, object-type, record-type, optional-type function init() { @@ -2780,7 +2780,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -2790,7 +2790,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative integer and value of the second expression is a negative Signed8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -2807,7 +2807,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -2817,7 +2817,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -2834,7 +2834,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -2844,7 +2844,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, additive-expr, object-type, record-type, optional-type function init() { @@ -2861,7 +2861,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -2871,7 +2871,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative integer and value of the second expression is a negative Signed16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -2888,7 +2888,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -2898,7 +2898,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -2915,7 +2915,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -2925,7 +2925,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed32, additive-expr, object-type, record-type, optional-type function init() { @@ -2942,7 +2942,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -2952,7 +2952,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative integer and value of the second expression is a negative Signed32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -2969,7 +2969,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -2979,7 +2979,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -2996,7 +2996,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -3006,7 +3006,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned8, additive-expr, object-type, record-type, optional-type function init() { @@ -3023,7 +3023,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -3033,7 +3033,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned8, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -3050,7 +3050,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -3061,7 +3061,7 @@ Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, byte, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, byte, additive-expr, object-type, record-type, optional-type function init() { @@ -3078,7 +3078,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -3089,7 +3089,7 @@ Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, byte, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, byte, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -3106,7 +3106,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -3116,7 +3116,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned16, additive-expr, object-type, record-type, optional-type function init() { @@ -3133,7 +3133,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -3143,7 +3143,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned16, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -3160,7 +3160,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -3170,7 +3170,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned32, additive-expr, object-type, record-type, optional-type function init() { @@ -3187,7 +3187,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -3197,7 +3197,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned32, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -3214,7 +3214,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -3224,7 +3224,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed8 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, additive-expr, object-type, record-type, optional-type function init() { @@ -3241,7 +3241,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -3251,7 +3251,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a negative integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -3268,7 +3268,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -3278,7 +3278,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -3295,7 +3295,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -3305,7 +3305,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed8 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, int:Signed16, additive-expr, object-type, record-type, optional-type function init() { @@ -3322,7 +3322,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -3332,7 +3332,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a negative Signed16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -3349,7 +3349,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -3359,7 +3359,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -3376,7 +3376,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -3386,7 +3386,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed8 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, int:Signed32, additive-expr, object-type, record-type, optional-type function init() { @@ -3404,7 +3404,7 @@ function init() { foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -3414,7 +3414,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a negative Signed32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -3431,7 +3431,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -3441,7 +3441,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -3458,7 +3458,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -3468,7 +3468,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed8 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, int:Unsigned8, additive-expr, object-type, record-type, optional-type function init() { @@ -3486,7 +3486,7 @@ function init() { foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -3496,7 +3496,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, int:Unsigned8, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -3513,7 +3513,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -3524,7 +3524,7 @@ Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed8 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, byte, additive-expr, object-type, record-type, optional-type function init() { @@ -3541,7 +3541,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -3552,7 +3552,7 @@ Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, byte, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -3569,7 +3569,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -3579,7 +3579,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed8 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, int:Unsigned16, additive-expr, object-type, record-type, optional-type function init() { @@ -3596,7 +3596,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -3606,7 +3606,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, int:Unsigned16, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -3623,7 +3623,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -3633,7 +3633,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed8 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, int:Unsigned32, additive-expr, object-type, record-type, optional-type function init() { @@ -3650,7 +3650,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -3660,7 +3660,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, int:Unsigned32, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -3677,7 +3677,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -3687,7 +3687,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed16 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, additive-expr, object-type, record-type, optional-type function init() { @@ -3704,7 +3704,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -3714,7 +3714,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a negative integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -3731,7 +3731,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -3741,7 +3741,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -3758,7 +3758,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -3768,7 +3768,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed16 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, int:Signed8, additive-expr, object-type, record-type, optional-type function init() { @@ -3785,7 +3785,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -3795,7 +3795,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a negative Signed8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -3812,7 +3812,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -3822,7 +3822,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -3839,7 +3839,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -3849,7 +3849,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed16 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, int:Signed32, additive-expr, object-type, record-type, optional-type function init() { @@ -3866,7 +3866,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -3876,7 +3876,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a negative Signed32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -3893,7 +3893,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -3903,7 +3903,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -3920,7 +3920,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -3930,7 +3930,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed16 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, int:Unsigned8, additive-expr, object-type, record-type, optional-type function init() { @@ -3947,7 +3947,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -3957,7 +3957,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, int:Unsigned8, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -3974,7 +3974,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -3985,7 +3985,7 @@ Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed16 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, byte, additive-expr, object-type, record-type, optional-type function init() { @@ -4002,7 +4002,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -4013,7 +4013,7 @@ Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, byte, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -4030,7 +4030,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -4040,7 +4040,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed16 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, int:Unsigned16, additive-expr, object-type, record-type, optional-type function init() { @@ -4057,7 +4057,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -4067,7 +4067,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, int:Unsigned16, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -4084,7 +4084,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -4094,7 +4094,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed16 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, int:Unsigned32, additive-expr, object-type, record-type, optional-type function init() { @@ -4111,7 +4111,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -4121,7 +4121,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, int:Unsigned32, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -4138,7 +4138,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -4148,7 +4148,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed32 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed32, additive-expr, object-type, record-type, optional-type function init() { @@ -4165,7 +4165,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -4175,7 +4175,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a negative integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -4192,7 +4192,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -4202,7 +4202,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -4219,7 +4219,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -4229,7 +4229,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed32 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed32, int:Signed8, additive-expr, object-type, record-type, optional-type function init() { @@ -4246,7 +4246,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -4256,7 +4256,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a negative Signed8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed32, int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -4273,7 +4273,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -4283,7 +4283,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed32, int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -4300,7 +4300,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -4310,7 +4310,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed32 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed32, int:Signed16, additive-expr, object-type, record-type, optional-type function init() { @@ -4327,7 +4327,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -4337,7 +4337,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a negative Signed16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed32, int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -4354,7 +4354,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -4364,7 +4364,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed32, int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -4381,7 +4381,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -4391,7 +4391,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed32 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed32, int:Unsigned8, additive-expr, object-type, record-type, optional-type function init() { @@ -4408,7 +4408,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -4418,7 +4418,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed32, int:Unsigned8, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -4435,7 +4435,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -4446,7 +4446,7 @@ Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed32 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed32, bye, additive-expr, object-type, record-type, optional-type function init() { @@ -4463,7 +4463,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -4474,7 +4474,7 @@ Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed32, byte, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -4491,7 +4491,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -4501,7 +4501,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed32 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed32, int:Unsigned16, additive-expr, object-type, record-type, optional-type function init() { @@ -4518,7 +4518,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -4528,7 +4528,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed32, int:Unsigned16, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -4545,7 +4545,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -4555,7 +4555,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed32 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed32, int:Unsigned32, additive-expr, object-type, record-type, optional-type function init() { @@ -4572,7 +4572,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -4582,7 +4582,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed32, int:Unsigned32, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -4599,7 +4599,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -4609,7 +4609,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned8 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned8, additive-expr, object-type, record-type, optional-type function init() { @@ -4626,7 +4626,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -4636,7 +4636,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned8 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned8, int:Signed8, additive-expr, object-type, record-type, optional-type function init() { @@ -4654,7 +4654,7 @@ function init() { foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -4664,7 +4664,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned8 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned8, int:Signed16, additive-expr, object-type, record-type, optional-type function init() { @@ -4681,7 +4681,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -4691,7 +4691,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned8 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned8, int:Signed32, additive-expr, object-type, record-type, optional-type function init() { @@ -4708,7 +4708,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -4719,7 +4719,7 @@ Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned8 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned8, byte, additive-expr, object-type, record-type, optional-type function init() { @@ -4736,7 +4736,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -4746,7 +4746,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned8 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned8, int:Unsigned16, additive-expr, object-type, record-type, optional-type function init() { @@ -4763,7 +4763,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -4773,7 +4773,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned8 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned8, int:Unsigned32, additive-expr, object-type, record-type, optional-type function init() { @@ -4791,7 +4791,7 @@ function init() { foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -4801,7 +4801,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned16 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned16, additive-expr, object-type, record-type, optional-type function init() { @@ -4818,7 +4818,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -4828,7 +4828,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned16 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned16, int:Signed8, additive-expr, object-type, record-type, optional-type function init() { @@ -4845,7 +4845,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -4855,7 +4855,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned16 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned16, int:Signed16, additive-expr, object-type, record-type, optional-type function init() { @@ -4872,7 +4872,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -4882,7 +4882,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned16 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned16, int:Signed32, additive-expr, object-type, record-type, optional-type function init() { @@ -4899,7 +4899,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -4909,7 +4909,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned16 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned16, int:Unsigned8, additive-expr, object-type, record-type, optional-type function init() { @@ -4927,7 +4927,7 @@ function init() { foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -4938,7 +4938,7 @@ Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned16 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned16, byte, additive-expr, object-type, record-type, optional-type function init() { @@ -4955,7 +4955,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -4965,7 +4965,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned16 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned16, int:Unsigned32, additive-expr, object-type, record-type, optional-type function init() { @@ -4982,7 +4982,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -4992,7 +4992,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned32 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned32, additive-expr, object-type, record-type, optional-type function init() { @@ -5009,7 +5009,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -5019,7 +5019,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned32 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned32, int:Signed8, additive-expr, object-type, record-type, optional-type function init() { @@ -5036,7 +5036,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -5046,7 +5046,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned32 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned32, int:Signed16, additive-expr, object-type, record-type, optional-type function init() { @@ -5063,7 +5063,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -5073,7 +5073,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned32 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned32, int:Signed32, additive-expr, object-type, record-type, optional-type function init() { @@ -5090,7 +5090,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -5100,7 +5100,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned32 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned32, int:Unsigned8, additive-expr, object-type, record-type, optional-type function init() { @@ -5117,7 +5117,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -5128,7 +5128,7 @@ Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned32 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned32, byte, additive-expr, object-type, record-type, optional-type function init() { @@ -5145,7 +5145,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -5155,7 +5155,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned32 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned32, int:Unsigned16, additive-expr, object-type, record-type, optional-type function init() { @@ -5172,7 +5172,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -5183,7 +5183,7 @@ Test-Case: output Description: Test range expression (exclusive) with iterable object when values of both expressions are of user-defined subtypes of int. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, singleton-type, union-type, module-type-decl, additive-expr, object-type, record-type, optional-type type Ints 1|10; @@ -5202,7 +5202,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -5213,7 +5213,7 @@ Test-Case: output Description: Test range expression (exclusive) with iterable object when values of both expressions are of union of int subtypes. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, int:Unsigned32, union-type, additive-expr, object-type, record-type, optional-type function init() { @@ -5230,7 +5230,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -5240,7 +5240,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when the value of the first expression and the value of the second expression is equal. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, additive-expr, object-type, record-type, optional-type function init() { @@ -5257,7 +5257,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 0 @@ -5267,7 +5267,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when the value of the first expression is less than the value of the second expression. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, additive-expr, object-type, record-type, optional-type function init() { @@ -5284,7 +5284,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 0 @@ -5293,7 +5293,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when the types of the expressions are inferred. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, additive-expr, object-type, record-type, optional-type, var function init() { @@ -5310,7 +5310,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -5319,7 +5319,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when the types of the expressions and type of the range expression are inferred. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, additive-expr, var function init() { @@ -5331,7 +5331,7 @@ function init() { var range = startIndex ..< endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -5340,7 +5340,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) at module level. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, additive-expr, object-type, record-type, optional-type, var int startIndex = 1; @@ -5358,7 +5358,7 @@ function init() { int[] arr = []; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -5367,7 +5367,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) at module level. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, additive-expr, var int startIndex = 1; @@ -5380,7 +5380,7 @@ function init() { int[] arr = []; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -5389,7 +5389,7 @@ function init() { Test-Case: output Description: Test iterable object returned by the range expression (exclusive). -Labels: range-expr, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, object-type, +Labels: range-expr, array-type, list-constructor-expr, array:push, int, DecimalNumber, object-type, optional-type, var, value:toBalString, method-call-expr function init() { @@ -5416,9 +5416,9 @@ function init() { Test-Case: output Description: Test field and member access as expressions in range expression (exclusive). -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, field-access-expr, - DecimalNumber, int, mapping-constructor-expr, module-type-defn, object-type, record-type, optional-type, - additive-expr +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, field-access-expr, + DecimalNumber, int, mapping-constructor-expr, member-access-expr, module-type-defn, object-type, record-type, + optional-type, additive-expr type Record record { int x; @@ -5438,7 +5438,7 @@ function init() { } range = c.x ..< d[0]; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 20 @@ -5447,7 +5447,7 @@ function init() { Test-Case: output Description: Test function and method call as expressions in range expression (exclusive). -Labels: range-expr, iterable-object, DecimalNumber, array-type, list-constructor-expr, member-access-expr, +Labels: range-expr, iterable-object, DecimalNumber, array-type, list-constructor-expr, array:push, int, explicit-new-expr, function-call-expr, module-class-defn, method-call-expr, object-type, record-type, optional-type, additive-expr @@ -5470,7 +5470,7 @@ function init() { } range = cls.getInt() ..< getInt(); foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -5483,7 +5483,7 @@ function getInt() returns int { Test-Case: output Description: Test type cast expression as expressions in range expression (exclusive). -Labels: range-expr, iterable-object, DecimalNumber, array-type, list-constructor-expr, member-access-expr, +Labels: range-expr, iterable-object, DecimalNumber, array-type, list-constructor-expr, array:push, int, type-cast-expr, object-type, record-type, optional-type, additive-expr function init() { @@ -5498,7 +5498,7 @@ function init() { } range = 1.0 ..< 10.0; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -5507,7 +5507,7 @@ function init() { Test-Case: output Description: Test unary expressions as expressions in range expression (exclusive). -Labels: range-expr, iterable-object, DecimalNumber, array-type, list-constructor-expr, member-access-expr, +Labels: range-expr, iterable-object, DecimalNumber, array-type, list-constructor-expr, array:push, int, unary-complement, unary-minus, unary-plus, object-type, record-type, optional-type, additive-expr function init() { @@ -5522,7 +5522,7 @@ function init() { } range = -10 ..< +2; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -5533,7 +5533,7 @@ function init() { range = -10 ..< ~2; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 7 @@ -5542,7 +5542,7 @@ function init() { Test-Case: output Description: Test additive expression as expressions in range expression (exclusive). -Labels: range-expr, iterable-object, additive-expr, array-type, list-constructor-expr, member-access-expr, int, +Labels: range-expr, iterable-object, additive-expr, array-type, list-constructor-expr, array:push, int, DecimalNumber, object-type, record-type, optional-type function init() { @@ -5557,7 +5557,7 @@ function init() { } range = 0+1 ..< 12-2; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -5567,7 +5567,7 @@ function init() { Test-Case: output Description: Test multiplicative expressions as expressions in range expression (exclusive). Labels: range-expr, iterable-object, additive-expr, DecimalNumber, array-type, list-constructor-expr, - member-access-expr, int, multiplicative-expr, object-type, record-type, optional-type + array:push, int, multiplicative-expr, object-type, record-type, optional-type function init() { int count = 0; @@ -5581,7 +5581,7 @@ function init() { } range = 1*2 ..< 36/4; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 7 @@ -5592,7 +5592,7 @@ function init() { range = 34%5 ..< 4*5; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 16 @@ -5602,7 +5602,7 @@ function init() { Test-Case: output Description: Test binary bitwise expressions as expressions in range expression (exclusive). Labels: range-expr, iterable-object, binary-bitwise-expr, DecimalNumber, array-type, list-constructor-expr, - member-access-expr, int, additive-expr, object-type, record-type, optional-type + array:push, int, additive-expr, object-type, record-type, optional-type function init() { int count = 0; @@ -5616,7 +5616,7 @@ function init() { } range = (1&2) ..< (4|8); foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -5627,7 +5627,7 @@ function init() { range = (6|3) ..< (2^8); foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 3 @@ -5637,7 +5637,7 @@ function init() { Test-Case: output Description: Test checking expressions as expressions in range expression (exclusive). Labels: range-expr, iterable-object, check, checkpanic, DecimalNumber, error, additive-expr, array-type, - list-constructor-expr, member-access-expr, int, union-type, object-type, record-type, optional-type + list-constructor-expr, array:push, int, union-type, object-type, record-type, optional-type function init() returns error? { int|error startIndex = 2; @@ -5653,7 +5653,7 @@ function init() returns error? { } range = check startIndex ..< checkpanic endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -5662,7 +5662,7 @@ function init() returns error? { Test-Case: output Description: Test let expression as expressions in range expression (exclusive). -Labels: range-expr, iterable-object, DecimalNumber, array-type, list-constructor-expr, member-access-expr, int, let-expr, +Labels: range-expr, iterable-object, DecimalNumber, array-type, list-constructor-expr, array:push, int, let-expr, additive-expr, object-type, record-type, optional-type function init() { @@ -5677,7 +5677,7 @@ function init() { } range = (let int h1 = 10 in h1) ..< (let int h1 = 25 in h1); foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 15 @@ -5686,7 +5686,7 @@ function init() { Test-Case: output Description: Test shift expressions as expressions in range expression (exclusive). -Labels: range-expr, iterable-object, DecimalNumber, array-type, list-constructor-expr, member-access-expr, int, +Labels: range-expr, iterable-object, DecimalNumber, array-type, list-constructor-expr, array:push, int, shift-expr, additive-expr, object-type, record-type, optional-type function init() { @@ -5701,7 +5701,7 @@ function init() { } range = 1<<2 ..< 100>>4; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 2 @@ -5711,7 +5711,7 @@ function init() { Test-Case: output Description: Test conditional expressions as expressions in range expression (exclusive). Labels: range-expr, iterable-object, conditional-expr, DecimalNumber, error, array-type, list-constructor-expr, - member-access-expr, int, additive-expr, nil-literal, optional-type, union-type, object-type, record-type + array:push, int, additive-expr, nil-literal, optional-type, union-type, object-type, record-type function init() { int|error a = 10; @@ -5727,7 +5727,7 @@ function init() { } range = (a is error ? 5 : a) ..< (b ?: 25); foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 15 @@ -5758,7 +5758,7 @@ function init() { Test-Case: output Description: Test isolatedness of range expression (exclusive). Fail-Issue: ballerina-platform/ballerina-lang#33163 -Labels: range-expr, iterable-object, object-type, additive-expr, array-type, list-constructor-expr, member-access-expr, +Labels: range-expr, iterable-object, object-type, additive-expr, array-type, list-constructor-expr, array:push, int, DecimalNumber, function-call-expr, record-type, optional-type, lock-stmt isolated int j = 1; @@ -5767,7 +5767,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in getRange() { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -5788,7 +5788,7 @@ function getRange() returns object { Test-Case: output Description: Test isolatedness of the resultant object of the range expression (exclusive). Fail-Issue: ballerina-platform/ballerina-lang#33163 -Labels: range-expr, object-type, record-type, array-type, list-constructor-expr, member-access-expr, int, optional-type, +Labels: range-expr, object-type, record-type, array-type, list-constructor-expr, array:push, int, optional-type, is-expr, any, type-cast-expr function init() { @@ -5805,7 +5805,7 @@ function init() { Test-Case: output Description: Test isolatedness of the iterator() and next() methods of range expression (exclusive). Fail-Issue: ballerina-platform/ballerina-lang#33163 -Labels: range-expr, object-type, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, record-type, +Labels: range-expr, object-type, array-type, list-constructor-expr, array:push, int, DecimalNumber, record-type, optional-type, is-expr, method-call-expr function init() { @@ -5822,7 +5822,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with query expression. -Labels: range-expr, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, query-expr +Labels: range-expr, array-type, list-constructor-expr, array:push, int, DecimalNumber, query-expr function init() { int[] a = from int i in 1 ..< 10 diff --git a/conformance/lang/expressions/range-expr/range_expr_inclusive.balt b/conformance/lang/expressions/range-expr/range_expr_inclusive.balt index 951544d0..e3ed91a8 100644 --- a/conformance/lang/expressions/range-expr/range_expr_inclusive.balt +++ b/conformance/lang/expressions/range-expr/range_expr_inclusive.balt @@ -1,6 +1,6 @@ Test-Case: output Description: Test range expression (inclusive) when values of both expressions are positive integers. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, additive-expr function init() { @@ -9,7 +9,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 7 @@ -18,7 +18,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when values of both expressions are negative integers. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, unary-minus, additive-expr function init() { @@ -27,7 +27,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 6 @@ -37,7 +37,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when the value of one expression is a negative integer and the value of the other expression is a positive integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, unary-minus, additive-expr function init() { @@ -46,7 +46,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 31 @@ -56,7 +56,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when the value of one expression is a negative integer and the value of the other expression is a positive integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, unary-minus, additive-expr function init() { @@ -71,7 +71,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when values of both expressions are positive Signed8 integers. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, additive-expr function init() { @@ -80,7 +80,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -89,7 +89,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when values of both expressions are negative Signed8 integers. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, unary-minus, additive-expr function init() { @@ -98,7 +98,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -108,7 +108,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when the value of one expression is a negative Signed8 integer and the value of the other expression is a positive Signed8 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, unary-minus, additive-expr function init() { @@ -117,7 +117,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 31 @@ -126,7 +126,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when values of both expressions are positive Signed16 integers. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, additive-expr function init() { @@ -135,7 +135,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -144,7 +144,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when values of both expressions are negative Signed16 integers. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, unary-minus, additive-expr function init() { @@ -153,7 +153,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -163,7 +163,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when the value of one expression is a negative Signed16 integer and the value of the other expression is a positive Signed16 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, unary-minus, additive-expr function init() { @@ -172,7 +172,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 31 @@ -181,7 +181,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when values of both expressions are positive Signed32 integers. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed32, additive-expr function init() { @@ -190,7 +190,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -199,7 +199,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when values of both expressions are negative Signed32 integers. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed32, unary-minus, additive-expr function init() { @@ -208,7 +208,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -218,7 +218,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when the value of one expression is a negative Signed32 integer and the value of the other expression is a positive Signed32 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed32, unary-minus, additive-expr function init() { @@ -227,7 +227,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 31 @@ -236,7 +236,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when values of both expressions are Unsigned8 integers. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned8, additive-expr function init() { @@ -245,7 +245,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -254,7 +254,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when values of both expressions are Unsigned16 integers. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned16, additive-expr function init() { @@ -263,7 +263,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -272,7 +272,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when values of both expressions are Unsigned32 integers. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned32, additive-expr function init() { @@ -281,7 +281,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -291,7 +291,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, additive-expr function init() { @@ -300,7 +300,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -310,7 +310,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative integer and value of the second expression is a negative Signed8 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, unary-minus, additive-expr function init() { @@ -319,7 +319,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -329,7 +329,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, unary-minus, additive-expr function init() { @@ -338,7 +338,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 13 @@ -349,7 +349,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, additive-expr function init() { @@ -358,7 +358,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -368,7 +368,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative integer and value of the second expression is a negative Signed16 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, unary-minus, additive-expr function init() { @@ -377,7 +377,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -387,7 +387,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, unary-minus, additive-expr function init() { @@ -396,7 +396,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 13 @@ -406,7 +406,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed32, additive-expr function init() { @@ -415,7 +415,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -425,7 +425,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative integer and value of the second expression is a negative Signed32 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed32, unary-minus, additive-expr function init() { @@ -434,7 +434,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -444,7 +444,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed32, unary-minus, additive-expr function init() { @@ -453,7 +453,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 13 @@ -463,7 +463,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned8, additive-expr function init() { @@ -472,7 +472,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -482,7 +482,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned8, unary-minus, additive-expr function init() { @@ -491,7 +491,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 13 @@ -502,7 +502,7 @@ Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, byte, additive-expr function init() { @@ -511,7 +511,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -522,7 +522,7 @@ Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, byte, unary-minus, additive-expr function init() { @@ -531,7 +531,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 13 @@ -541,7 +541,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned16, additive-expr function init() { @@ -550,7 +550,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -560,7 +560,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned16, unary-minus, additive-expr function init() { @@ -569,7 +569,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 13 @@ -579,7 +579,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned32, additive-expr function init() { @@ -588,7 +588,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -598,7 +598,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned32, unary-minus, additive-expr function init() { @@ -607,7 +607,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 13 @@ -617,7 +617,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive Signed8 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, additive-expr function init() { @@ -626,7 +626,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -636,7 +636,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a negative integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, unary-minus, additive-expr function init() { @@ -645,7 +645,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -655,7 +655,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, unary-minus, additive-expr function init() { @@ -664,7 +664,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 13 @@ -674,7 +674,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive Signed8 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, int:Signed16, additive-expr function init() { @@ -683,7 +683,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -693,7 +693,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a negative Signed16 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, int:Signed16, unary-minus, additive-expr function init() { @@ -702,7 +702,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -712,7 +712,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, int:Signed16, unary-minus, additive-expr function init() { @@ -721,7 +721,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 13 @@ -731,7 +731,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive Signed8 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, int:Signed32, additive-expr function init() { @@ -740,7 +740,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -750,7 +750,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a negative Signed32 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, int:Signed32, unary-minus, additive-expr function init() { @@ -759,7 +759,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -769,7 +769,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, int:Signed32, unary-minus, additive-expr function init() { @@ -778,7 +778,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 13 @@ -788,7 +788,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive Signed8 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, int:Unsigned8, additive-expr function init() { @@ -797,7 +797,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -807,7 +807,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, int:Unsigned8, unary-minus, additive-expr function init() { @@ -816,7 +816,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 13 @@ -827,7 +827,7 @@ Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive Signed8 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, byte, additive-expr function init() { @@ -836,7 +836,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -847,7 +847,7 @@ Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, byte, unary-minus, additive-expr function init() { @@ -856,7 +856,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 13 @@ -866,7 +866,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive Signed8 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, int:Unsigned16, additive-expr function init() { @@ -875,7 +875,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -885,7 +885,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, int:Unsigned16, unary-minus, additive-expr function init() { @@ -894,7 +894,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 13 @@ -904,7 +904,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive Signed8 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, int:Unsigned32, additive-expr function init() { @@ -913,7 +913,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -923,7 +923,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, int:Unsigned32, unary-minus, additive-expr function init() { @@ -932,7 +932,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 13 @@ -942,7 +942,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive Signed16 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, additive-expr function init() { @@ -951,7 +951,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -961,7 +961,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a negative integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, unary-minus, additive-expr function init() { @@ -970,7 +970,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -980,7 +980,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, unary-minus, additive-expr function init() { @@ -989,7 +989,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 13 @@ -999,7 +999,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive Signed16 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, int:Signed16, additive-expr function init() { @@ -1008,7 +1008,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -1018,7 +1018,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a negative Signed8 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, int:Signed16, unary-minus, additive-expr function init() { @@ -1027,7 +1027,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -1037,7 +1037,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, int:Signed16, unary-minus, additive-expr function init() { @@ -1046,7 +1046,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 13 @@ -1056,7 +1056,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive Signed16 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, int:Signed32, additive-expr function init() { @@ -1065,7 +1065,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -1075,7 +1075,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a negative Signed32 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, int:Signed32, unary-minus, additive-expr function init() { @@ -1084,7 +1084,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -1094,7 +1094,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, int:Signed32, unary-minus, additive-expr function init() { @@ -1103,7 +1103,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 13 @@ -1113,7 +1113,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive Signed16 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, int:Unsigned8, additive-expr function init() { @@ -1122,7 +1122,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -1132,7 +1132,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, int:Unsigned8, unary-minus, additive-expr function init() { @@ -1141,7 +1141,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 13 @@ -1152,7 +1152,7 @@ Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive Signed16 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, byte, additive-expr function init() { @@ -1161,7 +1161,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -1172,7 +1172,7 @@ Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, byte, unary-minus, additive-expr function init() { @@ -1181,7 +1181,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 13 @@ -1191,7 +1191,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive Signed16 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, int:Unsigned16, additive-expr function init() { @@ -1200,7 +1200,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -1210,7 +1210,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, int:Unsigned16, unary-minus, additive-expr function init() { @@ -1219,7 +1219,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 13 @@ -1229,7 +1229,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive Signed16 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, int:Unsigned32, additive-expr function init() { @@ -1238,7 +1238,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -1248,7 +1248,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, int:Unsigned32, unary-minus, additive-expr function init() { @@ -1257,7 +1257,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 13 @@ -1267,7 +1267,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive Signed32 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed32, additive-expr function init() { @@ -1276,7 +1276,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -1286,7 +1286,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a negative integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed32, unary-minus, additive-expr function init() { @@ -1295,7 +1295,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -1305,7 +1305,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed32, unary-minus, additive-expr function init() { @@ -1314,7 +1314,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 13 @@ -1324,7 +1324,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive Signed32 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, int:Signed32, additive-expr function init() { @@ -1333,7 +1333,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -1343,7 +1343,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a negative Signed8 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, int:Signed32, unary-minus, additive-expr function init() { @@ -1352,7 +1352,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -1362,7 +1362,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, int:Signed32, unary-minus, additive-expr function init() { @@ -1371,7 +1371,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 13 @@ -1381,7 +1381,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive Signed32 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, int:Signed32, additive-expr function init() { @@ -1390,7 +1390,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -1400,7 +1400,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a negative Signed16 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, int:Signed32, unary-minus, additive-expr function init() { @@ -1409,7 +1409,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -1419,7 +1419,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, int:Signed32, unary-minus, additive-expr function init() { @@ -1428,7 +1428,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 13 @@ -1438,7 +1438,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive Signed32 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed32, int:Unsigned8, additive-expr function init() { @@ -1447,7 +1447,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -1457,7 +1457,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed32, int:Unsigned8, unary-minus, additive-expr function init() { @@ -1466,7 +1466,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 13 @@ -1477,7 +1477,7 @@ Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive Signed32 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed32, byte, additive-expr function init() { @@ -1486,7 +1486,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -1497,7 +1497,7 @@ Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed32, byte, unary-minus, additive-expr function init() { @@ -1506,7 +1506,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 13 @@ -1516,7 +1516,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive Signed32 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed32, int:Unsigned16, additive-expr function init() { @@ -1525,7 +1525,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -1535,7 +1535,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed32, int:Unsigned16, unary-minus, additive-expr function init() { @@ -1544,7 +1544,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 13 @@ -1554,7 +1554,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive Signed32 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed32, int:Unsigned32, additive-expr function init() { @@ -1563,7 +1563,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -1573,7 +1573,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed32, int:Unsigned32, unary-minus, additive-expr function init() { @@ -1582,7 +1582,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 13 @@ -1592,7 +1592,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a Unsigned8 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned8, additive-expr function init() { @@ -1601,7 +1601,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -1611,7 +1611,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a Unsigned8 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, int:Unsigned8, additive-expr function init() { @@ -1620,7 +1620,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -1630,7 +1630,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a Unsigned8 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, int:Unsigned8, additive-expr function init() { @@ -1639,7 +1639,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -1649,7 +1649,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a Unsigned8 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed32, int:Unsigned8, additive-expr function init() { @@ -1658,7 +1658,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -1669,7 +1669,7 @@ Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a Unsigned8 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned8, byte, additive-expr function init() { @@ -1678,7 +1678,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -1688,7 +1688,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a Unsigned8 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned8, int:Unsigned16, additive-expr function init() { @@ -1697,7 +1697,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -1707,7 +1707,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a Unsigned8 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned8, int:Unsigned32, additive-expr function init() { @@ -1716,7 +1716,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -1726,7 +1726,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a Unsigned16 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned16, additive-expr function init() { @@ -1735,7 +1735,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -1745,7 +1745,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a Unsigned16 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, int:Unsigned16, additive-expr function init() { @@ -1754,7 +1754,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -1764,7 +1764,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a Unsigned16 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, int:Unsigned16, additive-expr function init() { @@ -1773,7 +1773,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -1783,7 +1783,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a Unsigned16 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed32, int:Unsigned16, additive-expr function init() { @@ -1792,7 +1792,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -1802,7 +1802,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a Unsigned16 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned8, int:Unsigned16, additive-expr function init() { @@ -1811,7 +1811,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -1822,7 +1822,7 @@ Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a Unsigned16 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned16, byte, additive-expr function init() { @@ -1831,7 +1831,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -1841,7 +1841,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a Unsigned16 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned16, int:Unsigned32, additive-expr function init() { @@ -1850,7 +1850,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -1860,7 +1860,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a Unsigned32 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned32, additive-expr function init() { @@ -1869,7 +1869,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -1879,7 +1879,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a Unsigned32 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, int:Unsigned32, additive-expr function init() { @@ -1888,7 +1888,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -1898,7 +1898,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a Unsigned32 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, int:Unsigned32, additive-expr function init() { @@ -1907,7 +1907,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -1917,7 +1917,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a Unsigned32 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed32, int:Unsigned32, additive-expr function init() { @@ -1926,7 +1926,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -1936,7 +1936,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a Unsigned32 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned8, int:Unsigned32, additive-expr function init() { @@ -1945,7 +1945,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -1956,7 +1956,7 @@ Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a Unsigned32 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned32, byte, additive-expr function init() { @@ -1965,7 +1965,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -1975,7 +1975,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a Unsigned32 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned16, int:Unsigned32, additive-expr function init() { @@ -1984,7 +1984,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -1994,7 +1994,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when values of both expressions are of user-defined subtypes of int. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, singleton-type, union-type, module-type-decl, additive-expr type Ints 1|10; @@ -2005,7 +2005,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -2015,7 +2015,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when values of both expressions are of union of int subtypes. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, int:Unsigned32, union-type, additive-expr function init() { @@ -2024,7 +2024,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -2034,7 +2034,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when the value of the first expression and the value of the second expression is equal. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, additive-expr function init() { @@ -2044,7 +2044,7 @@ function init() { int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 1 @@ -2054,7 +2054,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when the value of the first expression is less than the value of the second expression. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, additive-expr function init() { @@ -2064,7 +2064,7 @@ function init() { int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 0 @@ -2073,7 +2073,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when the types of the expressions are inferred. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, additive-expr, var function init() { @@ -2083,7 +2083,7 @@ function init() { int[] arr = []; foreach int i in startIndex ... endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -2092,8 +2092,8 @@ function init() { Test-Case: output Description: Test field and member access as expressions in range expression (inclusive). -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, field-access-expr, - int, DecimalNumber, mapping-constructor-expr, module-type-defn, record-type +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, field-access-expr, + int, DecimalNumber, mapping-constructor-expr, member-access-expr, module-type-defn, record-type type Record record { int x; @@ -2106,7 +2106,7 @@ function init() { int[] arr = []; foreach int i in c.x ... d[0] { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 21 @@ -2115,7 +2115,7 @@ function init() { Test-Case: output Description: Test function and method call as expressions in range expression (inclusive). -Labels: range-expr, iterable-inclusive, DecimalNumber, array-type, list-constructor-expr, member-access-expr, int, +Labels: range-expr, iterable-inclusive, DecimalNumber, array-type, list-constructor-expr, array:push, int, explicit-new-expr, function-call-expr, module-class-defn, method-call-expr class Class { @@ -2130,7 +2130,7 @@ function init() { int[] arr = []; foreach int i in cls.getInt() ... getInt() { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -2143,7 +2143,7 @@ function getInt() returns int { Test-Case: output Description: Test type cast expression as expressions in range expression (inclusive). -Labels: range-expr, iterable-inclusive, DecimalNumber, array-type, list-constructor-expr, member-access-expr, int, +Labels: range-expr, iterable-inclusive, DecimalNumber, array-type, list-constructor-expr, array:push, int, type-cast-expr, additive-expr function init() { @@ -2151,7 +2151,7 @@ function init() { int[] arr = []; foreach int i in 1.0 ... 10.0 { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -2160,7 +2160,7 @@ function init() { Test-Case: output Description: Test unary expressions as expressions in range expression (inclusive). -Labels: range-expr, iterable-inclusive, DecimalNumber, array-type, list-constructor-expr, member-access-expr, int, +Labels: range-expr, iterable-inclusive, DecimalNumber, array-type, list-constructor-expr, array:push, int, unary-complement, unary-minus, unary-plus function init() { @@ -2168,7 +2168,7 @@ function init() { int[] arr = []; foreach int i in -10 ... +2 { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 13 @@ -2177,7 +2177,7 @@ function init() { count = 0; arr = []; foreach int i in -10 ... ~2 { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 8 @@ -2186,7 +2186,7 @@ function init() { Test-Case: output Description: Test additive expression as expressions in range expression (inclusive). -Labels: range-expr, iterable-inclusive, additive-expr, array-type, list-constructor-expr, member-access-expr, +Labels: range-expr, iterable-inclusive, additive-expr, array-type, list-constructor-expr, array:push, int, DecimalNumber function init() { @@ -2194,7 +2194,7 @@ function init() { int[] arr = []; foreach int i in 0+1 ... 12-2 { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -2203,7 +2203,7 @@ function init() { Test-Case: output Description: Test multiplicative expressions as expressions in range expression (inclusive). -Labels: range-expr, iterable-inclusive, DecimalNumber, array-type, list-constructor-expr, member-access-expr, int, +Labels: range-expr, iterable-inclusive, DecimalNumber, array-type, list-constructor-expr, array:push, int, multiplicative-expr, additive-expr function init() { @@ -2211,7 +2211,7 @@ function init() { int[] arr = []; foreach int i in 1*2 ... 36/4 { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 8 @@ -2220,7 +2220,7 @@ function init() { count = 0; arr = []; foreach int i in 34%5 ... 4*5 { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 17 @@ -2230,14 +2230,14 @@ function init() { Test-Case: output Description: Test binary bitwise expressions as expressions in range expression (inclusive). Labels: range-expr, iterable-inclusive, binary-bitwise-expr, DecimalNumber, array-type, list-constructor-expr, - member-access-expr, int, additive-expr + array:push, int, additive-expr function init() { int count = 0; int[] arr = []; foreach int i in (1&2) ... (4|8) { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 13 @@ -2246,7 +2246,7 @@ function init() { count = 0; arr = []; foreach int i in (6|3) ... (2^8) { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 4 @@ -2256,7 +2256,7 @@ function init() { Test-Case: output Description: Test checking expressions as expressions in range expression (inclusive). Labels: range-expr, iterable-inclusive, check, checkpanic, DecimalNumber, error, array-type, list-constructor-expr, - member-access-expr, int, union-type, optional-type + array:push, int, union-type, optional-type function init() returns error? { int|error startIndex = 2; @@ -2265,7 +2265,7 @@ function init() returns error? { int[] arr = []; foreach int i in check startIndex ... checkpanic endIndex { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 11 @@ -2274,14 +2274,14 @@ function init() returns error? { Test-Case: output Description: Test let expression as expressions in range expression (inclusive). -Labels: range-expr, iterable-inclusive, DecimalNumber, array-type, list-constructor-expr, member-access-expr, int, let-expr +Labels: range-expr, iterable-inclusive, DecimalNumber, array-type, list-constructor-expr, array:push, int, let-expr function init() { int count = 0; int[] arr = []; foreach int i in (let int h1 = 10 in h1) ... (let int h1 = 25 in h1) { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 16 @@ -2290,14 +2290,14 @@ function init() { Test-Case: output Description: Test shift expressions as expressions in range expression (inclusive). -Labels: range-expr, iterable-inclusive, DecimalNumber, array-type, list-constructor-expr, member-access-expr, int, shift-expr +Labels: range-expr, iterable-inclusive, DecimalNumber, array-type, list-constructor-expr, array:push, int, shift-expr function init() { int count = 0; int[] arr = []; foreach int i in 1 << 2 ... 100 >> 4 { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 3 @@ -2307,7 +2307,7 @@ function init() { Test-Case: output Description: Test conditional expressions as expressions in range expression (inclusive). Labels: range-expr, iterable-inclusive, conditional-expr, DecimalNumber, error, array-type, list-constructor-expr, - member-access-expr, int, nil-literal, optional-type, union-type + array:push, int, nil-literal, optional-type, union-type function init() { int|error a = 10; @@ -2316,7 +2316,7 @@ function init() { int[] arr = []; foreach int i in (a is error ? 5 : a) ... (b ?: 25) { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 16 @@ -2338,7 +2338,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when values of both expressions are positive integers. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, additive-expr, object-type, record-type, optional-type function init() { @@ -2355,7 +2355,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 7 @@ -2364,7 +2364,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when values of both expressions are negative integers. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -2381,7 +2381,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 6 @@ -2391,7 +2391,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when the value of one expression is a negative integer and the value of the other expression is a positive integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -2408,7 +2408,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 31 @@ -2442,7 +2442,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when values of both expressions are positive Signed8 integers. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, additive-expr, int:Signed8, object-type, record-type, optional-type function init() { @@ -2459,7 +2459,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -2469,7 +2469,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when values of both expressions are negative Signed8 integers. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -2486,7 +2486,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -2496,7 +2496,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when the value of one expression is a negative Signed8 integer and the value of the other expression is a positive Signed8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -2513,7 +2513,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 13 @@ -2523,7 +2523,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when values of both expressions are positive Signed16 integers. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, additive-expr, object-type, record-type, optional-type function init() { @@ -2540,7 +2540,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -2550,7 +2550,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when values of both expressions are negative Signed16 integers. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -2567,7 +2567,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -2577,7 +2577,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when the value of one expression is a negative Signed16 integer and the value of the other expression is a positive Signed16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -2594,7 +2594,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 31 @@ -2604,7 +2604,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when values of both expressions are positive Signed32 integers. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed32, additive-expr, object-type, record-type, optional-type function init() { @@ -2621,7 +2621,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -2631,7 +2631,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when values of both expressions are negative Signed32 integers. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -2648,7 +2648,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -2658,7 +2658,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when the value of one expression is a negative Signed32 integer and the value of the other expression is a positive Signed32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -2675,7 +2675,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 31 @@ -2685,7 +2685,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when values of both expressions are Unsigned8 integers. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned8, additive-expr, object-type, record-type, optional-type function init() { @@ -2702,7 +2702,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -2712,7 +2712,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when values of both expressions are Unsigned16 integers. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned16, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -2729,7 +2729,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -2739,7 +2739,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when values of both expressions are Unsigned32 integers. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned32, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -2756,7 +2756,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -2766,7 +2766,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, additive-expr, object-type, record-type, optional-type function init() { @@ -2783,7 +2783,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -2793,7 +2793,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative integer and value of the second expression is a negative Signed8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -2810,7 +2810,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -2820,7 +2820,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -2837,7 +2837,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 13 @@ -2847,7 +2847,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, additive-expr, object-type, record-type, optional-type function init() { @@ -2864,7 +2864,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -2874,7 +2874,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative integer and value of the second expression is a negative Signed16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -2891,7 +2891,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -2901,7 +2901,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -2918,7 +2918,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 13 @@ -2928,7 +2928,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed32, additive-expr, object-type, record-type, optional-type function init() { @@ -2945,7 +2945,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -2955,7 +2955,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative integer and value of the second expression is a negative Signed32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -2972,7 +2972,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -2982,7 +2982,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -2999,7 +2999,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 13 @@ -3009,7 +3009,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned8, additive-expr, object-type, record-type, optional-type function init() { @@ -3026,7 +3026,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -3036,7 +3036,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned8, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -3053,7 +3053,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 13 @@ -3064,7 +3064,7 @@ Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, byte, additive-expr, object-type, record-type, optional-type function init() { @@ -3081,7 +3081,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -3092,7 +3092,7 @@ Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, byte, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -3109,7 +3109,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 13 @@ -3119,7 +3119,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned16, additive-expr, object-type, record-type, optional-type function init() { @@ -3136,7 +3136,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -3146,7 +3146,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned16, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -3163,7 +3163,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 13 @@ -3173,7 +3173,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned32, additive-expr, object-type, record-type, optional-type function init() { @@ -3190,7 +3190,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -3200,7 +3200,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned32, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -3217,7 +3217,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 13 @@ -3227,7 +3227,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed8 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, additive-expr, object-type, record-type, optional-type function init() { @@ -3244,7 +3244,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -3254,7 +3254,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a negative integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -3271,7 +3271,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -3281,7 +3281,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -3298,7 +3298,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 13 @@ -3308,7 +3308,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed8 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, int:Signed16, additive-expr, object-type, record-type, optional-type function init() { @@ -3325,7 +3325,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -3335,7 +3335,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a negative Signed16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -3352,7 +3352,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -3362,7 +3362,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -3379,7 +3379,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 13 @@ -3389,7 +3389,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed8 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, int:Signed32, additive-expr, object-type, record-type, optional-type function init() { @@ -3407,7 +3407,7 @@ function init() { foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -3417,7 +3417,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a negative Signed32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -3434,7 +3434,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -3444,7 +3444,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -3461,7 +3461,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 13 @@ -3471,7 +3471,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed8 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, int:Unsigned8, additive-expr, object-type, record-type, optional-type function init() { @@ -3489,7 +3489,7 @@ function init() { foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -3499,7 +3499,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, int:Unsigned8, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -3516,7 +3516,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 13 @@ -3527,7 +3527,7 @@ Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed8 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, byte, additive-expr, object-type, record-type, optional-type function init() { @@ -3544,7 +3544,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -3555,7 +3555,7 @@ Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, byte, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -3572,7 +3572,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 13 @@ -3582,7 +3582,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed8 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, int:Unsigned16, additive-expr, object-type, record-type, optional-type function init() { @@ -3599,7 +3599,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -3609,7 +3609,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, int:Unsigned16, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -3626,7 +3626,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 13 @@ -3636,7 +3636,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed8 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, int:Unsigned32, additive-expr, object-type, record-type, optional-type function init() { @@ -3653,7 +3653,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -3663,7 +3663,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, int:Unsigned32, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -3680,7 +3680,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 13 @@ -3690,7 +3690,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed16 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, additive-expr, object-type, record-type, optional-type function init() { @@ -3707,7 +3707,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -3717,7 +3717,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a negative integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -3734,7 +3734,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -3744,7 +3744,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -3761,7 +3761,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 13 @@ -3771,7 +3771,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed16 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, int:Signed8, additive-expr, object-type, record-type, optional-type function init() { @@ -3788,7 +3788,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -3798,7 +3798,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a negative Signed8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -3815,7 +3815,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -3825,7 +3825,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -3842,7 +3842,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 13 @@ -3852,7 +3852,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed16 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, int:Signed32, additive-expr, object-type, record-type, optional-type function init() { @@ -3869,7 +3869,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -3879,7 +3879,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a negative Signed32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -3896,7 +3896,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -3906,7 +3906,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -3923,7 +3923,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 13 @@ -3933,7 +3933,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed16 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, int:Unsigned8, additive-expr, object-type, record-type, optional-type function init() { @@ -3950,7 +3950,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -3960,7 +3960,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, int:Unsigned8, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -3977,7 +3977,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 13 @@ -3988,7 +3988,7 @@ Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed16 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, byte, additive-expr, object-type, record-type, optional-type function init() { @@ -4005,7 +4005,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -4016,7 +4016,7 @@ Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, byte, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -4033,7 +4033,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 13 @@ -4043,7 +4043,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed16 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, int:Unsigned16, additive-expr, object-type, record-type, optional-type function init() { @@ -4060,7 +4060,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -4070,7 +4070,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, int:Unsigned16, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -4087,7 +4087,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 13 @@ -4097,7 +4097,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed16 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, int:Unsigned32, additive-expr, object-type, record-type, optional-type function init() { @@ -4114,7 +4114,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -4124,7 +4124,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed16, int:Unsigned32, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -4141,7 +4141,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 13 @@ -4151,7 +4151,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed32 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed32, additive-expr, object-type, record-type, optional-type function init() { @@ -4168,7 +4168,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -4178,7 +4178,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a negative integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -4195,7 +4195,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -4205,7 +4205,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -4222,7 +4222,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 13 @@ -4232,7 +4232,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed32 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed32, int:Signed8, additive-expr, object-type, record-type, optional-type function init() { @@ -4249,7 +4249,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -4259,7 +4259,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a negative Signed8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed32, int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -4276,7 +4276,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -4286,7 +4286,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed32, int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -4303,7 +4303,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 13 @@ -4313,7 +4313,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed32 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed32, int:Signed16, additive-expr, object-type, record-type, optional-type function init() { @@ -4330,7 +4330,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -4340,7 +4340,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a negative Signed16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed32, int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -4357,7 +4357,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -4367,7 +4367,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed32, int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -4384,7 +4384,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 13 @@ -4394,7 +4394,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed32 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed32, int:Unsigned8, additive-expr, object-type, record-type, optional-type function init() { @@ -4411,7 +4411,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -4421,7 +4421,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed32, int:Unsigned8, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -4438,7 +4438,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 13 @@ -4449,7 +4449,7 @@ Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed32 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed32, bye, additive-expr, object-type, record-type, optional-type function init() { @@ -4466,7 +4466,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -4477,7 +4477,7 @@ Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed32, byte, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -4494,7 +4494,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 13 @@ -4504,7 +4504,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed32 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed32, int:Unsigned16, additive-expr, object-type, record-type, optional-type function init() { @@ -4521,7 +4521,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -4531,7 +4531,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed32, int:Unsigned16, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -4548,7 +4548,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 13 @@ -4558,7 +4558,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed32 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed32, int:Unsigned32, additive-expr, object-type, record-type, optional-type function init() { @@ -4575,7 +4575,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -4585,7 +4585,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed32, int:Unsigned32, additive-expr, object-type, record-type, optional-type, unary-minus function init() { @@ -4602,7 +4602,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 13 @@ -4612,7 +4612,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned8 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned8, additive-expr, object-type, record-type, optional-type function init() { @@ -4629,7 +4629,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -4639,7 +4639,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned8 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned8, int:Signed8, additive-expr, object-type, record-type, optional-type function init() { @@ -4657,7 +4657,7 @@ function init() { foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -4667,7 +4667,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned8 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned8, int:Signed16, additive-expr, object-type, record-type, optional-type function init() { @@ -4684,7 +4684,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -4694,7 +4694,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned8 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned8, int:Signed32, additive-expr, object-type, record-type, optional-type function init() { @@ -4711,7 +4711,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -4722,7 +4722,7 @@ Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned8 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned8, byte, additive-expr, object-type, record-type, optional-type function init() { @@ -4739,7 +4739,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -4749,7 +4749,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned8 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned8, int:Unsigned16, additive-expr, object-type, record-type, optional-type function init() { @@ -4766,7 +4766,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -4776,7 +4776,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned8 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned8, int:Unsigned32, additive-expr, object-type, record-type, optional-type function init() { @@ -4794,7 +4794,7 @@ function init() { foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -4804,7 +4804,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned16 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned16, additive-expr, object-type, record-type, optional-type function init() { @@ -4821,7 +4821,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -4831,7 +4831,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned16 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned16, int:Signed8, additive-expr, object-type, record-type, optional-type function init() { @@ -4848,7 +4848,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -4858,7 +4858,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned16 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned16, int:Signed16, additive-expr, object-type, record-type, optional-type function init() { @@ -4875,7 +4875,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -4885,7 +4885,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned16 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned16, int:Signed32, additive-expr, object-type, record-type, optional-type function init() { @@ -4902,7 +4902,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -4912,7 +4912,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned16 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned16, int:Unsigned8, additive-expr, object-type, record-type, optional-type function init() { @@ -4930,7 +4930,7 @@ function init() { foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -4941,7 +4941,7 @@ Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned16 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned16, byte, additive-expr, object-type, record-type, optional-type function init() { @@ -4958,7 +4958,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -4968,7 +4968,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned16 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned16, int:Unsigned32, additive-expr, object-type, record-type, optional-type function init() { @@ -4985,7 +4985,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -4995,7 +4995,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned32 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned32, additive-expr, object-type, record-type, optional-type function init() { @@ -5012,7 +5012,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -5022,7 +5022,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned32 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned32, int:Signed8, additive-expr, object-type, record-type, optional-type function init() { @@ -5039,7 +5039,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -5049,7 +5049,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned32 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned32, int:Signed16, additive-expr, object-type, record-type, optional-type function init() { @@ -5066,7 +5066,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -5076,7 +5076,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned32 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned32, int:Signed32, additive-expr, object-type, record-type, optional-type function init() { @@ -5093,7 +5093,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -5103,7 +5103,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned32 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned32, int:Unsigned8, additive-expr, object-type, record-type, optional-type function init() { @@ -5120,7 +5120,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -5131,7 +5131,7 @@ Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned32 integer and value of the second expression is a byte. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned32, byte, additive-expr, object-type, record-type, optional-type function init() { @@ -5148,7 +5148,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -5158,7 +5158,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned32 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Unsigned32, int:Unsigned16, additive-expr, object-type, record-type, optional-type function init() { @@ -5175,7 +5175,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -5186,7 +5186,7 @@ Test-Case: output Description: Test range expression (inclusive) with iterable object when values of both expressions are of user-defined subtypes of int. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, singleton-type, union-type, module-type-decl, additive-expr, object-type, record-type, optional-type type Ints 1|10; @@ -5205,7 +5205,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -5216,7 +5216,7 @@ Test-Case: output Description: Test range expression (inclusive) with iterable object when values of both expressions are of union of int subtypes. Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, int:Unsigned32, union-type, additive-expr, object-type, record-type, optional-type function init() { @@ -5233,7 +5233,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -5243,7 +5243,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when the value of the first expression and the value of the second expression is equal. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, additive-expr, object-type, record-type, optional-type function init() { @@ -5260,7 +5260,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 1 @@ -5270,7 +5270,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when the value of the first expression is less than the value of the second expression. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, additive-expr, object-type, record-type, optional-type function init() { @@ -5287,7 +5287,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 0 @@ -5297,7 +5297,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when the types of the values of the expressions are inferred. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, additive-expr, object-type, record-type, optional-type, var function init() { @@ -5314,7 +5314,7 @@ function init() { } range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -5324,7 +5324,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when the types of the values of the expressions and type of the range expression are inferred. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, additive-expr, var function init() { @@ -5336,7 +5336,7 @@ function init() { var range = startIndex ... endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -5345,7 +5345,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) at module level. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, additive-expr, object-type, record-type, optional-type, var int startIndex = 1; @@ -5363,7 +5363,7 @@ function init() { int[] arr = []; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -5372,7 +5372,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) at module level. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, additive-expr, var int startIndex = 1; @@ -5385,7 +5385,7 @@ function init() { int[] arr = []; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -5394,7 +5394,7 @@ function init() { Test-Case: output Description: Test iterable object returned by the range expression (inclusive). -Labels: range-expr, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, object-type, +Labels: range-expr, array-type, list-constructor-expr, array:push, int, DecimalNumber, object-type, optional-type, var, value:toBalString, method-call-expr function init() { @@ -5425,9 +5425,9 @@ function init() { Test-Case: output Description: Test field and member access as expressions in range expression (inclusive). -Labels: range-expr, iterable-object, additive-expr, array-type, list-constructor-expr, member-access-expr, - field-access-expr, DecimalNumber, int, mapping-constructor-expr, module-type-defn, object-type, - record-type, optional-type +Labels: range-expr, iterable-object, additive-expr, array-type, list-constructor-expr, array:push, + field-access-expr, DecimalNumber, int, mapping-constructor-expr, member-access-expr, module-type-defn, + object-type, record-type, optional-type type Record record { int x; @@ -5447,7 +5447,7 @@ function init() { } range = c.x ... d[0]; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 21 @@ -5456,7 +5456,7 @@ function init() { Test-Case: output Description: Test function and method call as expressions in range expression (inclusive). -Labels: range-expr, iterable-object, DecimalNumber, array-type, list-constructor-expr, member-access-expr, int, +Labels: range-expr, iterable-object, DecimalNumber, array-type, list-constructor-expr, array:push, int, explicit-new-expr, function-call-expr, module-class-defn, method-call-expr, additive-expr, object-type, record-type, optional-type @@ -5479,7 +5479,7 @@ function init() { } range = cls.getInt() ... getInt(); foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -5492,7 +5492,7 @@ function getInt() returns int { Test-Case: output Description: Test type cast expression as expressions in range expression (inclusive). -Labels: range-expr, iterable-object, DecimalNumber, array-type, list-constructor-expr, member-access-expr, +Labels: range-expr, iterable-object, DecimalNumber, array-type, list-constructor-expr, array:push, int, type-cast-expr, additive-expr, object-type, record-type, optional-type function init() { @@ -5507,7 +5507,7 @@ function init() { } range = 1.0 ... 10.0; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -5516,7 +5516,7 @@ function init() { Test-Case: output Description: Test unary expressions as expressions in range expression (inclusive). -Labels: range-expr, iterable-object, DecimalNumber, array-type, list-constructor-expr, member-access-expr, int, +Labels: range-expr, iterable-object, DecimalNumber, array-type, list-constructor-expr, array:push, int, unary-complement, unary-minus, unary-plus, additive-expr, object-type, record-type, optional-type function init() { @@ -5531,7 +5531,7 @@ function init() { } range = -10 ... +2; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 13 @@ -5542,7 +5542,7 @@ function init() { range = -10 ... ~2; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 8 @@ -5551,7 +5551,7 @@ function init() { Test-Case: output Description: Test additive expression as expressions in range expression (inclusive). -Labels: range-expr, iterable-object, additive-expr, array-type, list-constructor-expr, member-access-expr, int, +Labels: range-expr, iterable-object, additive-expr, array-type, list-constructor-expr, array:push, int, DecimalNumber, object-type, record-type, optional-type function init() { @@ -5566,7 +5566,7 @@ function init() { } range = 0+1 ... 12-2; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -5575,7 +5575,7 @@ function init() { Test-Case: output Description: Test multiplicative expressions as expressions in range expression (inclusive). -Labels: range-expr, iterable-object, additive-expr, DecimalNumber, array-type, list-constructor-expr, member-access-expr, +Labels: range-expr, iterable-object, additive-expr, DecimalNumber, array-type, list-constructor-expr, array:push, int, multiplicative-expr, object-type, record-type, optional-type function init() { @@ -5590,7 +5590,7 @@ function init() { } range = 1*2 ... 36/4; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 8 @@ -5601,7 +5601,7 @@ function init() { range = 34%5 ... 4*5; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 17 @@ -5611,7 +5611,7 @@ function init() { Test-Case: output Description: Test binary bitwise expressions as expressions in range expression (inclusive). Labels: range-expr, iterable-object, binary-bitwise-expr, DecimalNumber, array-type, list-constructor-expr, - member-access-expr, int, additive-expr, object-type, record-type, optional-type + array:push, int, additive-expr, object-type, record-type, optional-type function init() { int count = 0; @@ -5625,7 +5625,7 @@ function init() { } range = (1&2) ... (4|8); foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 13 @@ -5636,7 +5636,7 @@ function init() { range = (6|3) ... (2^8); foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 4 @@ -5646,7 +5646,7 @@ function init() { Test-Case: output Description: Test checking expressions as expressions in range expression (inclusive). Labels: range-expr, iterable-object, check, checkpanic, DecimalNumber, error, array-type, list-constructor-expr, - member-access-expr, int, union-type, additive-expr, object-type, record-type, optional-type + array:push, int, union-type, additive-expr, object-type, record-type, optional-type function init() returns error? { int|error startIndex = 2; @@ -5662,7 +5662,7 @@ function init() returns error? { } range = check startIndex ... checkpanic endIndex; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 11 @@ -5671,7 +5671,7 @@ function init() returns error? { Test-Case: output Description: Test let expression as expressions in range expression (inclusive). -Labels: range-expr, iterable-object, DecimalNumber, array-type, list-constructor-expr, member-access-expr, +Labels: range-expr, iterable-object, DecimalNumber, array-type, list-constructor-expr, array:push, int, let-expr, additive-expr, object-type, record-type, optional-type function init() { @@ -5686,7 +5686,7 @@ function init() { } range = (let int h1 = 10 in h1) ... (let int h1 = 25 in h1); foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 16 @@ -5695,7 +5695,7 @@ function init() { Test-Case: output Description: Test shift expressions as expressions in range expression (inclusive). -Labels: range-expr, iterable-object, DecimalNumber, array-type, list-constructor-expr, member-access-expr, +Labels: range-expr, iterable-object, DecimalNumber, array-type, list-constructor-expr, array:push, int, shift-expr, additive-expr, object-type, record-type, optional-type function init() { @@ -5710,7 +5710,7 @@ function init() { } range = 1<<2 ... 100>>4; foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 3 @@ -5720,7 +5720,7 @@ function init() { Test-Case: output Description: Test conditional expressions as expressions in range expression (inclusive). Labels: range-expr, iterable-object, conditional-expr, additive-expr, DecimalNumber, error, array-type, - list-constructor-expr, member-access-expr, int, nil-literal, optional-type, union-type, object-type, record-type + list-constructor-expr, array:push, int, nil-literal, optional-type, union-type, object-type, record-type function init() { int|error a = 10; @@ -5736,7 +5736,7 @@ function init() { } range = (a is error ? 5 : a) ... (b ?: 25); foreach int i in range { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 16 @@ -5767,7 +5767,7 @@ function init() { Test-Case: output Description: Test isolatedness of range expression (inclusive). Fail-Issue: ballerina-platform/ballerina-lang#33163 -Labels: range-expr, iterable-object, object-type, additive-expr, array-type, list-constructor-expr, member-access-expr, +Labels: range-expr, iterable-object, object-type, additive-expr, array-type, list-constructor-expr, array:push, int, DecimalNumber, function-call-expr, record-type, optional-type, lock-stmt isolated int j = 1; @@ -5776,7 +5776,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in getRange() { - arr[count] = i; + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -5797,7 +5797,7 @@ function getRange() returns object { Test-Case: output Description: Test isolatedness of the resultant object of the range expression (inclusive). Fail-Issue: ballerina-platform/ballerina-lang#33163 -Labels: range-expr, object-type, record-type, array-type, list-constructor-expr, member-access-expr, int, +Labels: range-expr, object-type, record-type, array-type, list-constructor-expr, array:push, int, optional-type, is-expr, any, type-cast-expr function init() { @@ -5814,7 +5814,7 @@ function init() { Test-Case: output Description: Test isolatedness of the iterator() and next() methods of range expression (inclusive). Fail-Issue: ballerina-platform/ballerina-lang#33163 -Labels: range-expr, object-type, array-type, list-constructor-expr, member-access-expr, int, DecimalNumber, +Labels: range-expr, object-type, array-type, list-constructor-expr, array:push, int, DecimalNumber, record-type, optional-type, is-expr, method-call-expr function init() { @@ -5831,8 +5831,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with query expression. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, member-access-expr, array-type, - list-constructor-expr, member-access-expr, int, DecimalNumber, query-expr +Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, array-type, + list-constructor-expr, array:push, int, DecimalNumber, query-expr function init() { int[] a = from int i in 1 ... 10 From 86f497d26053789fa66f49663bc3094aef7d5dd4 Mon Sep 17 00:00:00 2001 From: lasinicl Date: Sun, 17 Oct 2021 23:00:20 +0530 Subject: [PATCH 06/14] Fix expected error --- .../lang/expressions/range-expr/range_expr_exclusive.balt | 8 ++++---- .../lang/expressions/range-expr/range_expr_inclusive.balt | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/conformance/lang/expressions/range-expr/range_expr_exclusive.balt b/conformance/lang/expressions/range-expr/range_expr_exclusive.balt index 7fbbb41f..409543d8 100644 --- a/conformance/lang/expressions/range-expr/range_expr_exclusive.balt +++ b/conformance/lang/expressions/range-expr/range_expr_exclusive.balt @@ -5850,13 +5850,13 @@ Description: Test assigning the result of range expression (exclusive) to an inc Labels: range-expr, int, DecimalNumber, object-type, float, record-type, optional-type function init() { - int _ = 1 ..< 10; // @error result of a range expression is an object + int _ = 1 ..< 10; // @error expects an int, but the result of a range expression is an object object { public isolated function iterator() returns (object { public isolated function next() returns (record {|float value;|}?); }); - } _ = 1 ..< 10; // @error next() of range expression's iterable object returns a record {|int value;|} + } _ = 1 ..< 10; // @error expects next() returning record {|float value;|}?, but the next() of range expression's iterable object returns a record {|int value;|}? } Test-Case: error @@ -5867,11 +5867,11 @@ Labels: range-expr, int, DecimalNumber, object-type, var, record-type, optional- function init() { var a = 1 ..< 10; - int _ = a; // @error result of a range expression is an object + int _ = a; // @error expects an int, but the result of a range expression is an object object { public isolated function iterator() returns (object { public isolated function next() returns (record {|float value;|}?); }); - } _ = a; // @error next() of range expression's iterable object returns a record {|int value;|} + } _ = a; // @error expects next() returning record {|float value;|}?, but the next() of range expression's iterable object returns a record {|int value;|}? } diff --git a/conformance/lang/expressions/range-expr/range_expr_inclusive.balt b/conformance/lang/expressions/range-expr/range_expr_inclusive.balt index e3ed91a8..b4855b97 100644 --- a/conformance/lang/expressions/range-expr/range_expr_inclusive.balt +++ b/conformance/lang/expressions/range-expr/range_expr_inclusive.balt @@ -5860,13 +5860,13 @@ Description: Test assigning the result of range expression (inclusive) to an inc Labels: range-expr, int, DecimalNumber, object-type, record-type, optional-type function init() { - int _ = 1 ... 10; // @error result of a range expression is an object + int _ = 1 ... 10; // @error expects an int, but the result of a range expression is an object object { public isolated function iterator() returns (object { public isolated function next() returns (record {|float value;|}?); }); - } _ = 1 ... 10; // @error next() of range expression's iterable object returns a record {|int value;|} + } _ = 1 ... 10; // @error expects next() returning record {|float value;|}?, but the next() of range expression's iterable object returns a record {|int value;|}? } Test-Case: error @@ -5877,13 +5877,13 @@ Labels: range-expr, int, DecimalNumber, object-type, var, record-type, float, op function init() { var a = 1 ... 10; - int _ = a; // @error result of a range expression is an object + int _ = a; // @error expects an int, but the result of a range expression is an object object { public isolated function iterator() returns (object { public isolated function next() returns (record {|float value;|}?); }); - } _ = a; // @error next() of range expression's iterable object returns a record {|int value;|} + } _ = a; // @error expects next() returning record {|float value;|}?, but the next() of range expression's iterable object returns a record {|int value;|}? } Test-Case: parser-error From 6d89b1ecb36e03f9edde1b50ef19297b985802fd Mon Sep 17 00:00:00 2001 From: lasinicl Date: Mon, 18 Oct 2021 23:13:23 +0530 Subject: [PATCH 07/14] Fix labels --- .../lang/expressions/range-expr/range_expr_exclusive.balt | 4 ++-- .../lang/expressions/range-expr/range_expr_inclusive.balt | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/conformance/lang/expressions/range-expr/range_expr_exclusive.balt b/conformance/lang/expressions/range-expr/range_expr_exclusive.balt index 409543d8..ce4bc058 100644 --- a/conformance/lang/expressions/range-expr/range_expr_exclusive.balt +++ b/conformance/lang/expressions/range-expr/range_expr_exclusive.balt @@ -2301,8 +2301,8 @@ function init() { Test-Case: output Description: Test conditional expressions as expressions in range expression (exclusive). -Labels: range-expr, iterable-exclusive, conditional-expr, DecimalNumber, error, array-type, list-constructor-expr, - array:push, int, nil-literal, optional-type, union-type, additive-expr +Labels: range-expr, iterable-exclusive, ternary-conditional-expr, binary-conditional-expr, DecimalNumber, error, + array-type, list-constructor-expr, array:push, int, nil-literal, optional-type, union-type, additive-expr function init() { int|error a = 10; diff --git a/conformance/lang/expressions/range-expr/range_expr_inclusive.balt b/conformance/lang/expressions/range-expr/range_expr_inclusive.balt index b4855b97..7e73e303 100644 --- a/conformance/lang/expressions/range-expr/range_expr_inclusive.balt +++ b/conformance/lang/expressions/range-expr/range_expr_inclusive.balt @@ -2306,8 +2306,8 @@ function init() { Test-Case: output Description: Test conditional expressions as expressions in range expression (inclusive). -Labels: range-expr, iterable-inclusive, conditional-expr, DecimalNumber, error, array-type, list-constructor-expr, - array:push, int, nil-literal, optional-type, union-type +Labels: range-expr, iterable-inclusive, ternary-conditional-expr, binary-conditional-expr, DecimalNumber, error, + array-type, list-constructor-expr, array:push, int, nil-literal, optional-type, union-type function init() { int|error a = 10; From ea4ca949dce6d2fd87cf3972dab3d909200818ab Mon Sep 17 00:00:00 2001 From: lasinicl Date: Tue, 19 Apr 2022 15:36:03 +0530 Subject: [PATCH 08/14] Update fixed issues and reorder labels --- .../range-expr/range_expr_exclusive.balt | 1588 ++++++++--------- .../range-expr/range_expr_inclusive.balt | 1052 ++++++----- 2 files changed, 1288 insertions(+), 1352 deletions(-) diff --git a/conformance/lang/expressions/range-expr/range_expr_exclusive.balt b/conformance/lang/expressions/range-expr/range_expr_exclusive.balt index ce4bc058..1d023153 100644 --- a/conformance/lang/expressions/range-expr/range_expr_exclusive.balt +++ b/conformance/lang/expressions/range-expr/range_expr_exclusive.balt @@ -1,7 +1,6 @@ Test-Case: output Description: Test range expression (exclusive) when values of both expressions are positive integers. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-exclusive, list-constructor-expr, range-expr function init() { int startIndex = 0; @@ -9,7 +8,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 6 @@ -18,8 +17,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when values of both expressions are negative integers. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-exclusive, list-constructor-expr, + range-expr, unary-minus function init() { int startIndex = -6; @@ -27,7 +26,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 5 @@ -37,8 +36,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when the value of one expression is a negative integer and the value of the other expression is a positive integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-exclusive, list-constructor-expr, + range-expr, unary-minus function init() { int startIndex = -10; @@ -46,7 +45,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 30 @@ -56,7 +55,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when the value of one expression is a negative integer and the value of the other expression is a positive integer. -Labels: range-expr, iterable-exclusive, int, DecimalNumber, unary-minus, additive-expr +Labels: additive-expr, DecimalNumber, int, iterable-exclusive, range-expr, unary-minus function init() { int startIndex = -7635315; @@ -70,7 +69,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when values of both expressions are positive Signed8 integers. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, int:Signed8, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, iterable-exclusive, + list-constructor-expr, range-expr function init() { int:Signed8 startIndex = 1; @@ -87,8 +87,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when values of both expressions are negative Signed8 integers. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, iterable-exclusive, + list-constructor-expr, range-expr, unary-minus function init() { int:Signed8 startIndex = -10; @@ -96,7 +96,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -106,8 +106,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when the value of one expression is a negative Signed8 integer and the value of the other expression is a positive Signed8 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, iterable-exclusive, + list-constructor-expr, range-expr, unary-minus function init() { int:Signed8 startIndex = -10; @@ -115,7 +115,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 30 @@ -124,8 +124,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when values of both expressions are positive Signed16 integers. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, iterable-exclusive, + list-constructor-expr, range-expr function init() { int:Signed16 startIndex = 1; @@ -133,7 +133,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -142,8 +142,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when values of both expressions are negative Signed16 integers. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, iterable-exclusive, + list-constructor-expr, range-expr, unary-minus function init() { int:Signed16 startIndex = -10; @@ -151,7 +151,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -161,8 +161,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when the value of one expression is a negative Signed16 integer and the value of the other expression is a positive Signed16 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, iterable-exclusive, + list-constructor-expr, range-expr, unary-minus function init() { int:Signed16 startIndex = -10; @@ -170,7 +170,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 30 @@ -179,8 +179,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when values of both expressions are positive Signed32 integers. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed32, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, iterable-exclusive, + list-constructor-expr, range-expr function init() { int:Signed32 startIndex = 1; @@ -188,7 +188,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -197,8 +197,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when values of both expressions are negative Signed32 integers. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed32, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, iterable-exclusive, + list-constructor-expr, range-expr, unary-minus function init() { int:Signed32 startIndex = -10; @@ -206,7 +206,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -216,8 +216,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when the value of one expression is a negative Signed32 integer and the value of the other expression is a positive Signed32 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed32, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, iterable-exclusive, + list-constructor-expr, range-expr, unary-minus function init() { int:Signed32 startIndex = -10; @@ -225,7 +225,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 30 @@ -234,8 +234,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when values of both expressions are Unsigned8 integers. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned8, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned8, iterable-exclusive, + list-constructor-expr, range-expr function init() { int:Unsigned8 startIndex = 1; @@ -243,7 +243,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -252,8 +252,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when values of both expressions are Unsigned16 integers. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned16, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned16, iterable-exclusive, + list-constructor-expr, range-expr function init() { int:Unsigned16 startIndex = 1; @@ -261,7 +261,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -270,8 +270,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when values of both expressions are Unsigned32 integers. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned32, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned32, iterable-exclusive, + list-constructor-expr, range-expr function init() { int:Unsigned32 startIndex = 1; @@ -279,7 +279,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -289,8 +289,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, iterable-exclusive, + list-constructor-expr, range-expr function init() { int startIndex = 1; @@ -298,7 +298,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -308,8 +308,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative integer and value of the second expression is a negative Signed8 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, iterable-exclusive, + list-constructor-expr, range-expr, unary-minus function init() { int startIndex = -10; @@ -317,7 +317,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -327,8 +327,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, iterable-exclusive, + list-constructor-expr, range-expr, unary-minus function init() { int startIndex = -10; @@ -336,7 +336,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -346,8 +346,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, iterable-exclusive, + list-constructor-expr, range-expr function init() { int startIndex = 1; @@ -355,7 +355,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -365,8 +365,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative integer and value of the second expression is a negative Signed16 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, iterable-exclusive, + list-constructor-expr, range-expr, unary-minus function init() { int startIndex = -10; @@ -374,7 +374,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -384,8 +384,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, iterable-exclusive, + list-constructor-expr, range-expr, unary-minus function init() { int startIndex = -10; @@ -393,7 +393,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -403,8 +403,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed32, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, iterable-exclusive, + list-constructor-expr, range-expr function init() { int startIndex = 1; @@ -412,7 +412,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -422,8 +422,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative integer and value of the second expression is a negative Signed32 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed32, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, iterable-exclusive, + list-constructor-expr, range-expr, unary-minus function init() { int startIndex = -10; @@ -431,7 +431,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -441,8 +441,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed32, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, iterable-exclusive, + list-constructor-expr, range-expr, unary-minus function init() { int startIndex = -10; @@ -450,7 +450,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -460,8 +460,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned8, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned8, iterable-exclusive, + list-constructor-expr, range-expr function init() { int startIndex = 1; @@ -469,7 +469,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -479,8 +479,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned8, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned8, iterable-exclusive, + list-constructor-expr, range-expr, unary-minus function init() { int startIndex = -10; @@ -488,7 +488,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -498,9 +498,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive integer and value of the second expression is a byte. -Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - byte, additive-expr +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, iterable-exclusive, list-constructor-expr, + range-expr function init() { int startIndex = 1; @@ -508,7 +507,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -518,9 +517,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative integer and value of the second expression is a byte. -Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - byte, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, iterable-exclusive, list-constructor-expr, + range-expr, unary-minus function init() { int startIndex = -10; @@ -528,7 +526,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -538,8 +536,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned16, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned16, iterable-exclusive, + list-constructor-expr, range-expr function init() { int startIndex = 1; @@ -547,7 +545,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -557,8 +555,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned16, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned16, iterable-exclusive, + list-constructor-expr, range-expr, unary-minus function init() { int startIndex = -10; @@ -566,7 +564,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -576,8 +574,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned32, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned32, iterable-exclusive, + list-constructor-expr, range-expr function init() { int startIndex = 1; @@ -585,7 +583,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -595,8 +593,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned32, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned32, iterable-exclusive, + list-constructor-expr, range-expr, unary-minus function init() { int startIndex = -10; @@ -604,7 +602,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -614,8 +612,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive Signed8 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, iterable-exclusive, + list-constructor-expr, range-expr function init() { int:Signed8 startIndex = 1; @@ -623,7 +621,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -633,8 +631,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a negative integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, iterable-exclusive, + list-constructor-expr, range-expr, unary-minus function init() { int:Signed8 startIndex = -10; @@ -642,7 +640,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -652,8 +650,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, iterable-exclusive, + list-constructor-expr, range-expr, unary-minus function init() { int:Signed8 startIndex = -10; @@ -661,7 +659,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -671,8 +669,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive Signed8 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, int:Signed16, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed8, iterable-exclusive, + list-constructor-expr, range-expr function init() { int:Signed8 startIndex = 1; @@ -680,7 +678,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -690,8 +688,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a negative Signed16 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, int:Signed16, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed8, iterable-exclusive, + list-constructor-expr, range-expr, unary-minus function init() { int:Signed8 startIndex = -10; @@ -699,7 +697,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -709,8 +707,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, int:Signed16, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed8, iterable-exclusive, + list-constructor-expr, range-expr, unary-minus function init() { int:Signed8 startIndex = -10; @@ -718,7 +716,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -728,8 +726,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive Signed8 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, int:Signed32, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Signed8, iterable-exclusive, + list-constructor-expr, range-expr function init() { int:Signed8 startIndex = 1; @@ -737,7 +735,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -747,8 +745,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a negative Signed32 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, int:Signed32, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Signed8, iterable-exclusive, + list-constructor-expr, range-expr, unary-minus function init() { int:Signed8 startIndex = -10; @@ -756,7 +754,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -766,8 +764,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, int:Signed32, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Signed8, iterable-exclusive, + list-constructor-expr, range-expr, unary-minus function init() { int:Signed8 startIndex = -10; @@ -775,7 +773,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -785,8 +783,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive Signed8 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, int:Unsigned8, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, int:Unsigned8, iterable-exclusive, + list-constructor-expr, range-expr function init() { int:Signed8 startIndex = 1; @@ -794,7 +792,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -804,8 +802,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, int:Unsigned8, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, int:Unsigned8, iterable-exclusive, + list-constructor-expr, range-expr, unary-minus function init() { int:Signed8 startIndex = -10; @@ -813,7 +811,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -823,9 +821,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive Signed8 integer and value of the second expression is a byte. -Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, byte, additive-expr +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, int:Signed8, iterable-exclusive, + list-constructor-expr, range-expr function init() { int:Signed8 startIndex = 1; @@ -833,7 +830,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -843,9 +840,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a byte. -Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, byte, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, int:Signed8, iterable-exclusive, + list-constructor-expr, range-expr, unary-minus function init() { int:Signed8 startIndex = -10; @@ -853,7 +849,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -863,8 +859,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive Signed8 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, int:Unsigned16, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, int:Unsigned16, iterable-exclusive, + list-constructor-expr, range-expr function init() { int:Signed8 startIndex = 1; @@ -872,7 +868,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -882,8 +878,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, int:Unsigned16, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, int:Unsigned16, iterable-exclusive, + list-constructor-expr, range-expr, unary-minus function init() { int:Signed8 startIndex = -10; @@ -891,7 +887,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -901,8 +897,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive Signed8 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, int:Unsigned32, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, int:Unsigned32, iterable-exclusive, + list-constructor-expr, range-expr function init() { int:Signed8 startIndex = 1; @@ -910,7 +906,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -920,8 +916,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, int:Unsigned32, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, int:Unsigned32, iterable-exclusive, + list-constructor-expr, range-expr, unary-minus function init() { int:Signed8 startIndex = -10; @@ -929,7 +925,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -939,8 +935,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive Signed16 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, iterable-exclusive, + list-constructor-expr, range-expr function init() { int:Signed16 startIndex = 1; @@ -948,7 +944,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -958,8 +954,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a negative integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, iterable-exclusive, + list-constructor-expr, range-expr, unary-minus function init() { int:Signed16 startIndex = -10; @@ -967,7 +963,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -977,8 +973,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, iterable-exclusive, + list-constructor-expr, range-expr, unary-minus function init() { int:Signed16 startIndex = -10; @@ -986,7 +982,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -996,8 +992,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive Signed16 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, int:Signed16, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed8, iterable-exclusive, + list-constructor-expr, range-expr function init() { int:Signed16 startIndex = 1; @@ -1005,7 +1001,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -1015,8 +1011,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a negative Signed8 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, int:Signed16, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed8, iterable-exclusive, + list-constructor-expr, range-expr, unary-minus function init() { int:Signed16 startIndex = -10; @@ -1024,7 +1020,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -1034,8 +1030,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, int:Signed16, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed8, iterable-exclusive, + list-constructor-expr, range-expr, unary-minus function init() { int:Signed16 startIndex = -10; @@ -1043,7 +1039,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -1053,8 +1049,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive Signed16 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, int:Signed32, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed32, iterable-exclusive, + list-constructor-expr, range-expr function init() { int:Signed16 startIndex = 1; @@ -1062,7 +1058,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -1072,8 +1068,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a negative Signed32 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, int:Signed32, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed32, iterable-exclusive, + list-constructor-expr, range-expr, unary-minus function init() { int:Signed16 startIndex = -10; @@ -1081,7 +1077,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -1091,8 +1087,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, int:Signed32, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed32, iterable-exclusive, + list-constructor-expr, range-expr, unary-minus function init() { int:Signed16 startIndex = -10; @@ -1100,7 +1096,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -1110,8 +1106,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive Signed16 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, int:Unsigned8, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Unsigned8, iterable-exclusive, + list-constructor-expr, range-expr function init() { int:Signed16 startIndex = 1; @@ -1119,7 +1115,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -1129,8 +1125,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, int:Unsigned8, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Unsigned8, iterable-exclusive, + list-constructor-expr, range-expr, unary-minus function init() { int:Signed16 startIndex = -10; @@ -1138,7 +1134,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -1148,9 +1144,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive Signed16 integer and value of the second expression is a byte. -Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, byte, additive-expr +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, int:Signed16, iterable-exclusive, + list-constructor-expr, range-expr function init() { int:Signed16 startIndex = 1; @@ -1158,7 +1153,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -1168,9 +1163,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a byte. -Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, byte, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, int:Signed16, iterable-exclusive, + list-constructor-expr, range-expr, unary-minus function init() { int:Signed16 startIndex = -10; @@ -1178,7 +1172,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -1188,8 +1182,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive Signed16 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, int:Unsigned16, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Unsigned16, iterable-exclusive, + list-constructor-expr, range-expr function init() { int:Signed16 startIndex = 1; @@ -1197,7 +1191,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -1207,8 +1201,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, int:Unsigned16, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Unsigned16, iterable-exclusive, + list-constructor-expr, range-expr, unary-minus function init() { int:Signed16 startIndex = -10; @@ -1216,7 +1210,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -1226,8 +1220,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive Signed16 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, int:Unsigned32, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Unsigned32, iterable-exclusive, + list-constructor-expr, range-expr function init() { int:Signed16 startIndex = 1; @@ -1235,7 +1229,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -1245,8 +1239,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, int:Unsigned32, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Unsigned32, iterable-exclusive, + list-constructor-expr, range-expr, unary-minus function init() { int:Signed16 startIndex = -10; @@ -1254,7 +1248,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -1264,8 +1258,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive Signed32 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed32, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, iterable-exclusive, + list-constructor-expr, range-expr function init() { int:Signed32 startIndex = 1; @@ -1273,7 +1267,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -1283,8 +1277,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a negative integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed32, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, iterable-exclusive, + list-constructor-expr, range-expr, unary-minus function init() { int:Signed32 startIndex = -10; @@ -1292,7 +1286,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -1302,8 +1296,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed32, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, iterable-exclusive, + list-constructor-expr, range-expr, unary-minus function init() { int:Signed32 startIndex = -10; @@ -1311,7 +1305,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -1321,8 +1315,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive Signed32 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, int:Signed32, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Signed8, iterable-exclusive, + list-constructor-expr, range-expr function init() { int:Signed32 startIndex = 1; @@ -1330,7 +1324,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -1340,8 +1334,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a negative Signed8 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, int:Signed32, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Signed8, iterable-exclusive, + list-constructor-expr, range-expr, unary-minus function init() { int:Signed32 startIndex = -10; @@ -1349,7 +1343,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -1359,8 +1353,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, int:Signed32, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Signed8, iterable-exclusive, + list-constructor-expr, range-expr, unary-minus function init() { int:Signed32 startIndex = -10; @@ -1368,7 +1362,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -1378,8 +1372,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive Signed32 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, int:Signed32, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed32, iterable-exclusive, + list-constructor-expr, range-expr function init() { int:Signed32 startIndex = 1; @@ -1387,7 +1381,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -1397,8 +1391,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a negative Signed16 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, int:Signed32, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed32, iterable-exclusive, + list-constructor-expr, range-expr, unary-minus function init() { int:Signed32 startIndex = -10; @@ -1406,7 +1400,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -1416,8 +1410,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, int:Signed32, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed32, iterable-exclusive, + list-constructor-expr, range-expr, unary-minus function init() { int:Signed32 startIndex = -10; @@ -1425,7 +1419,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -1435,8 +1429,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive Signed32 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed32, int:Unsigned8, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Unsigned8, iterable-exclusive, + list-constructor-expr, range-expr function init() { int:Signed32 startIndex = 1; @@ -1444,7 +1438,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -1454,8 +1448,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed32, int:Unsigned8, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Unsigned8, iterable-exclusive, + list-constructor-expr, range-expr, unary-minus function init() { int:Signed32 startIndex = -10; @@ -1463,7 +1457,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -1473,9 +1467,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive Signed32 integer and value of the second expression is a byte. -Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed32, byte, additive-expr +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, int:Signed32, iterable-exclusive, + list-constructor-expr, range-expr function init() { int:Signed32 startIndex = 1; @@ -1483,7 +1476,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -1493,9 +1486,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a byte. -Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed32, byte, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, int:Signed32, iterable-exclusive, + list-constructor-expr, range-expr, unary-minus function init() { int:Signed32 startIndex = -10; @@ -1503,7 +1495,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -1513,8 +1505,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive Signed32 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed32, int:Unsigned16, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Unsigned16, iterable-exclusive, + list-constructor-expr, range-expr function init() { int:Signed32 startIndex = 1; @@ -1522,7 +1514,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -1532,8 +1524,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed32, int:Unsigned16, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Unsigned16, iterable-exclusive, + list-constructor-expr, range-expr, unary-minus function init() { int:Signed32 startIndex = -10; @@ -1541,7 +1533,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -1551,8 +1543,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive Signed32 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed32, int:Unsigned32, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Unsigned32, iterable-exclusive, + list-constructor-expr, range-expr function init() { int:Signed32 startIndex = 1; @@ -1560,7 +1552,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -1570,8 +1562,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed32, int:Unsigned32, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Unsigned32, iterable-exclusive, + list-constructor-expr, range-expr, unary-minus function init() { int:Signed32 startIndex = -10; @@ -1579,7 +1571,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -1589,8 +1581,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a Unsigned8 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned8, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned8, iterable-exclusive, + list-constructor-expr, range-expr function init() { int:Unsigned8 startIndex = 1; @@ -1598,7 +1590,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -1608,8 +1600,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a Unsigned8 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, int:Unsigned8, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, int:Unsigned8, iterable-exclusive, + list-constructor-expr, range-expr function init() { int:Unsigned8 startIndex = 1; @@ -1617,7 +1609,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -1627,8 +1619,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a Unsigned8 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, int:Unsigned8, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Unsigned8, iterable-exclusive, + list-constructor-expr, range-expr function init() { int:Unsigned8 startIndex = 1; @@ -1636,7 +1628,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -1646,8 +1638,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a Unsigned8 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed32, int:Unsigned8, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Unsigned8, iterable-exclusive, + list-constructor-expr, range-expr function init() { int:Unsigned8 startIndex = 1; @@ -1655,7 +1647,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -1665,9 +1657,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a Unsigned8 integer and value of the second expression is a byte. -Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned8, byte, additive-expr +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, int:Unsigned8, iterable-exclusive, + list-constructor-expr, range-expr function init() { int:Unsigned8 startIndex = 1; @@ -1675,7 +1666,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -1685,8 +1676,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a Unsigned8 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned8, int:Unsigned16, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned16, int:Unsigned8, iterable-exclusive, + list-constructor-expr, range-expr function init() { int:Unsigned8 startIndex = 1; @@ -1694,7 +1685,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -1704,8 +1695,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a Unsigned8 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned8, int:Unsigned32, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned32, int:Unsigned8, iterable-exclusive, + list-constructor-expr, range-expr function init() { int:Unsigned8 startIndex = 1; @@ -1713,7 +1704,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -1723,8 +1714,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a Unsigned16 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned16, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned16, iterable-exclusive, + list-constructor-expr, range-expr function init() { int:Unsigned16 startIndex = 1; @@ -1732,7 +1723,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -1742,8 +1733,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a Unsigned16 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, int:Unsigned16, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, int:Unsigned16, iterable-exclusive, + list-constructor-expr, range-expr function init() { int:Unsigned16 startIndex = 1; @@ -1751,7 +1742,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -1761,8 +1752,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a Unsigned16 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, int:Unsigned16, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Unsigned16, iterable-exclusive, + list-constructor-expr, range-expr function init() { int:Unsigned16 startIndex = 1; @@ -1770,7 +1761,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -1780,8 +1771,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a Unsigned16 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed32, int:Unsigned16, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Unsigned16, iterable-exclusive, + list-constructor-expr, range-expr function init() { int:Unsigned16 startIndex = 1; @@ -1789,7 +1780,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -1799,8 +1790,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a Unsigned16 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned8, int:Unsigned16, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned16, int:Unsigned8, iterable-exclusive, + list-constructor-expr, range-expr function init() { int:Unsigned16 startIndex = 1; @@ -1808,7 +1799,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -1818,9 +1809,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a Unsigned16 integer and value of the second expression is a byte. -Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned16, byte, additive-expr +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, int:Unsigned16, iterable-exclusive, + list-constructor-expr, range-expr function init() { int:Unsigned16 startIndex = 1; @@ -1828,7 +1818,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -1838,8 +1828,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a Unsigned16 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned16, int:Unsigned32, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned16, int:Unsigned32, iterable-exclusive, + list-constructor-expr, range-expr function init() { int:Unsigned16 startIndex = 1; @@ -1847,7 +1837,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -1857,8 +1847,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a Unsigned32 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned32, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned32, iterable-exclusive, + list-constructor-expr, range-expr function init() { int:Unsigned32 startIndex = 1; @@ -1866,7 +1856,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -1876,8 +1866,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a Unsigned32 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, int:Unsigned32, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, int:Unsigned32, iterable-exclusive, + list-constructor-expr, range-expr function init() { int:Unsigned32 startIndex = 1; @@ -1885,7 +1875,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -1895,8 +1885,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a Unsigned32 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, int:Unsigned32, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Unsigned32, iterable-exclusive, + list-constructor-expr, range-expr function init() { int:Unsigned32 startIndex = 1; @@ -1904,7 +1894,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -1914,8 +1904,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a Unsigned32 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed32, int:Unsigned32, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Unsigned32, iterable-exclusive, + list-constructor-expr, range-expr function init() { int:Unsigned32 startIndex = 1; @@ -1923,7 +1913,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -1933,8 +1923,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a Unsigned32 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned8, int:Unsigned32, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned32, int:Unsigned8, iterable-exclusive, + list-constructor-expr, range-expr function init() { int:Unsigned32 startIndex = 1; @@ -1942,7 +1932,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -1952,9 +1942,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a Unsigned32 integer and value of the second expression is a byte. -Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned32, byte, additive-expr +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, int:Unsigned32, iterable-exclusive, + list-constructor-expr, range-expr function init() { int:Unsigned32 startIndex = 1; @@ -1962,7 +1951,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -1972,8 +1961,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a Unsigned32 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned16, int:Unsigned32, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned16, int:Unsigned32, iterable-exclusive, + list-constructor-expr, range-expr function init() { int:Unsigned32 startIndex = 1; @@ -1981,7 +1970,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -1990,9 +1979,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when values of both expressions are of user-defined subtypes of int. -Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - singleton-type, union-type, module-type-decl, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-exclusive, list-constructor-expr, + module-type-defn, range-expr, singleton-type, union-type type Ints 1|10; @@ -2002,7 +1990,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -2011,9 +1999,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when values of both expressions are of union of int subtypes. -Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, int:Unsigned32, union-type, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, int:Unsigned32, iterable-exclusive, + list-constructor-expr, range-expr, union-type function init() { int:Signed8|int:Unsigned32 startIndex = 1; @@ -2021,7 +2008,7 @@ function init() { int count = 0; int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -2031,7 +2018,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when the value of the first expression and the value of the second expression is equal. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-exclusive, list-constructor-expr, range-expr function init() { int startIndex = 5; @@ -2040,7 +2027,7 @@ function init() { int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 0 @@ -2050,7 +2037,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when the value of the first expression is less than the value of the second expression. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-exclusive, list-constructor-expr, range-expr function init() { int startIndex = 5; @@ -2059,7 +2046,7 @@ function init() { int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 0 @@ -2068,8 +2055,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when the types expressions are inferred. -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - additive-expr, var +Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-exclusive, list-constructor-expr, + range-expr, var function init() { var startIndex = 1; @@ -2078,7 +2065,7 @@ function init() { int[] arr = []; foreach int i in startIndex ..< endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -2087,8 +2074,8 @@ function init() { Test-Case: output Description: Test field and member access as expressions in range expression (exclusive). -Labels: range-expr, iterable-exclusive, array-type, list-constructor-expr, array:push, field-access-expr, - DecimalNumber, int, mapping-constructor-expr, member-access-expr, module-type-defn, record-type, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, field-access-expr, int, iterable-exclusive, + list-constructor-expr, mapping-constructor-expr, member-access-expr, module-type-defn, range-expr, record-type type Record record { int x; @@ -2101,7 +2088,7 @@ function init() { int[] arr = []; foreach int i in c.x ..< d[0] { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 20 @@ -2110,8 +2097,8 @@ function init() { Test-Case: output Description: Test function and method call as expressions in range expression (exclusive). -Labels: range-expr, iterable-exclusive, DecimalNumber, array-type, list-constructor-expr, array:push, - int, explicit-new-expr, function-call-expr, module-class-defn, method-call-expr, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, explicit-new-expr, function-call-expr, int, + iterable-exclusive, list-constructor-expr, method-call-expr, module-class-defn, range-expr class Class { function getInt() returns int { @@ -2125,7 +2112,7 @@ function init() { int[] arr = []; foreach int i in cls.getInt() ..< getInt() { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -2138,15 +2125,15 @@ function getInt() returns int { Test-Case: output Description: Test type cast expression as expressions in range expression (exclusive). -Labels: range-expr, iterable-exclusive, DecimalNumber, array-type, list-constructor-expr, array:push, - int, type-cast-expr, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-exclusive, list-constructor-expr, + range-expr, type-cast-expr function init() { int count = 0; int[] arr = []; foreach int i in 1.0 ..< 10.0 { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -2155,15 +2142,15 @@ function init() { Test-Case: output Description: Test unary expressions as expressions in range expression (exclusive). -Labels: range-expr, iterable-exclusive, DecimalNumber, array-type, list-constructor-expr, array:push, int, - unary-complement, unary-minus, unary-plus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-exclusive, list-constructor-expr, + range-expr, unary-complement, unary-minus, unary-plus function init() { int count = 0; int[] arr = []; foreach int i in -10 ..< +2 { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -2172,7 +2159,7 @@ function init() { count = 0; arr = []; foreach int i in -10 ..< ~2 { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 7 @@ -2181,15 +2168,14 @@ function init() { Test-Case: output Description: Test additive expression as expressions in range expression (exclusive). -Labels: range-expr, iterable-exclusive, additive-expr, array-type, list-constructor-expr, array:push, - int, DecimalNumber +Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-exclusive, list-constructor-expr, range-expr function init() { int count = 0; int[] arr = []; foreach int i in 0+1 ..< 12-2 { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -2198,15 +2184,15 @@ function init() { Test-Case: output Description: Test multiplicative expressions as expressions in range expression (exclusive). -Labels: range-expr, iterable-exclusive, DecimalNumber, array-type, list-constructor-expr, array:push, int, - multiplicative-expr, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-exclusive, list-constructor-expr, + multiplicative-expr, range-expr function init() { int count = 0; int[] arr = []; foreach int i in 1*2 ..< 36/4 { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 7 @@ -2215,7 +2201,7 @@ function init() { count = 0; arr = []; foreach int i in 34%5 ..< 4*5 { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 16 @@ -2224,15 +2210,15 @@ function init() { Test-Case: output Description: Test binary bitwise expressions as expressions in range expression (exclusive). -Labels: range-expr, iterable-exclusive, binary-bitwise-expr, DecimalNumber, array-type, list-constructor-expr, - array:push, int, additive-expr +Labels: additive-expr, array-type, array:push, binary-bitwise-expr, DecimalNumber, int, iterable-exclusive, + list-constructor-expr, range-expr function init() { int count = 0; int[] arr = []; foreach int i in (1&2) ..< (4|8) { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -2241,7 +2227,7 @@ function init() { count = 0; arr = []; foreach int i in (6|3) ..< (2^8) { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 3 @@ -2250,8 +2236,8 @@ function init() { Test-Case: output Description: Test checking expressions as expressions in range expression (exclusive). -Labels: range-expr, iterable-exclusive, check, checkpanic, DecimalNumber, error, array-type, list-constructor-expr, - array:push, int, union-type, optional-type, additive-expr +Labels: additive-expr, array-type, array:push, check, checkpanic, DecimalNumber, error, int, iterable-exclusive, + list-constructor-expr, optional-type, range-expr, union-type function init() returns error? { int|error startIndex = 2; @@ -2260,7 +2246,7 @@ function init() returns error? { int[] arr = []; foreach int i in check startIndex ..< checkpanic endIndex { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -2269,14 +2255,14 @@ function init() returns error? { Test-Case: output Description: Test let expression as expressions in range expression (exclusive). -Labels: range-expr, iterable-exclusive, let-expr, DecimalNumber, int +Labels: DecimalNumber, int, iterable-exclusive, let-expr, range-expr function init() { int count = 0; int[] arr = []; foreach int i in (let int h1 = 10 in h1) ..< (let int h1 = 25 in h1) { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 15 @@ -2285,14 +2271,14 @@ function init() { Test-Case: output Description: Test shift expressions as expressions in range expression (exclusive). -Labels: range-expr, iterable-exclusive, shift-expr, DecimalNumber, int +Labels: DecimalNumber, int, iterable-exclusive, range-expr, shift-expr function init() { int count = 0; int[] arr = []; foreach int i in 1 << 2 ..< 100 >> 4 { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 2 @@ -2301,8 +2287,8 @@ function init() { Test-Case: output Description: Test conditional expressions as expressions in range expression (exclusive). -Labels: range-expr, iterable-exclusive, ternary-conditional-expr, binary-conditional-expr, DecimalNumber, error, - array-type, list-constructor-expr, array:push, int, nil-literal, optional-type, union-type, additive-expr +Labels: additive-expr, array-type, array:push, binary-conditional-expr, DecimalNumber, error, int, iterable-exclusive, + list-constructor-expr, nil-literal, optional-type, range-expr, ternary-conditional-expr, union-type function init() { int|error a = 10; @@ -2311,7 +2297,7 @@ function init() { int[] arr = []; foreach int i in (a is error ? 5 : a) ..< (b ?: 25) { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 15 @@ -2320,7 +2306,7 @@ function init() { Test-Case: output Description: Test lang.int constants as expressions in range expression (exclusive). -Labels: range-expr, iterable-exclusive, int, int:SIGNED8_MAX_VALUE, int:UNSIGNED8_MAX_VALUE, additive-expr +Labels: additive-expr, int, int:SIGNED8_MAX_VALUE, int:UNSIGNED8_MAX_VALUE, iterable-exclusive, range-expr function init() { int count = 0; @@ -2334,8 +2320,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when values of both expressions are positive integers. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-object, list-constructor-expr, object-type, + optional-type, range-expr, record-type function init() { int startIndex = 0; @@ -2351,7 +2337,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 6 @@ -2361,8 +2347,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when values of both expressions are negative integers. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-object, list-constructor-expr, object-type, + optional-type, range-expr, record-type, unary-minus function init() { int startIndex = -6; @@ -2378,7 +2364,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 5 @@ -2388,8 +2374,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when the value of one expression is a negative integer and the value of the other expression is a positive integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-object, list-constructor-expr, object-type, + optional-type, range-expr, record-type, unary-minus function init() { int startIndex = -10; @@ -2405,7 +2391,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 30 @@ -2415,7 +2401,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when the value of one expression is a negative integer and the value of the other expression is a positive integer. -Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, object-type, record-type, optional-type, +Labels: additive-expr, DecimalNumber, int, iterable-object, object-type, optional-type, range-expr, record-type, unary-minus function init() { @@ -2439,8 +2425,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when values of both expressions are positive Signed8 integers. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - additive-expr, int:Signed8, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, iterable-object, list-constructor-expr, + object-type, optional-type, range-expr, record-type function init() { int:Signed8 startIndex = 1; @@ -2466,8 +2452,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when values of both expressions are negative Signed8 integers. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, iterable-object, list-constructor-expr, + object-type, optional-type, range-expr, record-type, unary-minus function init() { int:Signed8 startIndex = -10; @@ -2483,7 +2469,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -2493,8 +2479,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when the value of one expression is a negative Signed8 integer and the value of the other expression is a positive Signed8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, iterable-object, list-constructor-expr, + object-type, optional-type, range-expr, record-type, unary-minus function init() { int:Signed8 startIndex = -10; @@ -2510,7 +2496,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -2520,8 +2506,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when values of both expressions are positive Signed16 integers. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, iterable-object, list-constructor-expr, + object-type, optional-type, range-expr, record-type function init() { int:Signed16 startIndex = 1; @@ -2537,7 +2523,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -2547,8 +2533,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when values of both expressions are negative Signed16 integers. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, iterable-object, list-constructor-expr, + object-type, optional-type, range-expr, record-type, unary-minus function init() { int:Signed16 startIndex = -10; @@ -2564,7 +2550,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -2572,10 +2558,10 @@ function init() { } Test-Case: output -Description: Test range expression (exclusive) with iterable object when the value of one expression is a +Description: Test range expression (exclusive) with iterable object when the value of one expression is a negative Signed16 integer and the value of the other expression is a positive Signed16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, iterable-object, list-constructor-expr, + object-type, optional-type, range-expr, record-type, unary-minus function init() { int:Signed16 startIndex = -10; @@ -2591,7 +2577,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 30 @@ -2599,10 +2585,10 @@ function init() { } Test-Case: output -Description: Test range expression (exclusive) with iterable object when values of both expressions are positive +Description: Test range expression (exclusive) with iterable object when values of both expressions are positive Signed32 integers. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed32, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, iterable-object, list-constructor-expr, + object-type, optional-type, range-expr, record-type function init() { int:Signed32 startIndex = 1; @@ -2618,7 +2604,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -2626,10 +2612,10 @@ function init() { } Test-Case: output -Description: Test range expression (exclusive) with iterable object when values of both expressions are negative +Description: Test range expression (exclusive) with iterable object when values of both expressions are negative Signed32 integers. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, iterable-object, list-constructor-expr, + object-type, optional-type, range-expr, record-type, unary-minus function init() { int:Signed32 startIndex = -10; @@ -2645,7 +2631,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -2653,10 +2639,10 @@ function init() { } Test-Case: output -Description: Test range expression (exclusive) with iterable object when the value of one expression is a +Description: Test range expression (exclusive) with iterable object when the value of one expression is a negative Signed32 integer and the value of the other expression is a positive Signed32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, iterable-object, list-constructor-expr, + object-type, optional-type, range-expr, record-type, unary-minus function init() { int:Signed32 startIndex = -10; @@ -2672,7 +2658,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 30 @@ -2680,10 +2666,10 @@ function init() { } Test-Case: output -Description: Test range expression (exclusive) with iterable object when values of both expressions are +Description: Test range expression (exclusive) with iterable object when values of both expressions are Unsigned8 integers. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned8, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned8, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int:Unsigned8 startIndex = 1; @@ -2699,7 +2685,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -2707,10 +2693,10 @@ function init() { } Test-Case: output -Description: Test range expression (exclusive) with iterable object when values of both expressions are +Description: Test range expression (exclusive) with iterable object when values of both expressions are Unsigned16 integers. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned16, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned16, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus function init() { int:Unsigned16 startIndex = 1; @@ -2726,7 +2712,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -2734,10 +2720,10 @@ function init() { } Test-Case: output -Description: Test range expression (exclusive) with iterable object when values of both expressions are +Description: Test range expression (exclusive) with iterable object when values of both expressions are Unsigned32 integers. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned32, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned32, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus function init() { int:Unsigned32 startIndex = 1; @@ -2753,7 +2739,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -2761,10 +2747,10 @@ function init() { } Test-Case: output -Description: Test range expression (exclusive) with iterable object when value of the first expression is a +Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, iterable-object, list-constructor-expr, + object-type, optional-type, range-expr, record-type function init() { int startIndex = 1; @@ -2780,7 +2766,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -2788,10 +2774,10 @@ function init() { } Test-Case: output -Description: Test range expression (exclusive) with iterable object when value of the first expression is a +Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative integer and value of the second expression is a negative Signed8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, iterable-object, list-constructor-expr, + object-type, optional-type, range-expr, record-type, unary-minus function init() { int startIndex = -10; @@ -2807,7 +2793,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -2815,10 +2801,10 @@ function init() { } Test-Case: output -Description: Test range expression (exclusive) with iterable object when value of the first expression is a +Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, iterable-object, list-constructor-expr, + object-type, optional-type, range-expr, record-type, unary-minus function init() { int startIndex = -10; @@ -2834,7 +2820,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -2842,10 +2828,10 @@ function init() { } Test-Case: output -Description: Test range expression (exclusive) with iterable object when value of the first expression is a +Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, iterable-object, list-constructor-expr, + object-type, optional-type, range-expr, record-type function init() { int startIndex = 1; @@ -2861,7 +2847,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -2869,10 +2855,10 @@ function init() { } Test-Case: output -Description: Test range expression (exclusive) with iterable object when value of the first expression is a +Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative integer and value of the second expression is a negative Signed16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, iterable-object, list-constructor-expr, + object-type, optional-type, range-expr, record-type, unary-minus function init() { int startIndex = -10; @@ -2888,7 +2874,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -2896,10 +2882,10 @@ function init() { } Test-Case: output -Description: Test range expression (exclusive) with iterable object when value of the first expression is a +Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, iterable-object, list-constructor-expr, + object-type, optional-type, range-expr, record-type, unary-minus function init() { int startIndex = -10; @@ -2915,7 +2901,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -2923,10 +2909,10 @@ function init() { } Test-Case: output -Description: Test range expression (exclusive) with iterable object when value of the first expression is a +Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed32, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, iterable-object, list-constructor-expr, + object-type, optional-type, range-expr, record-type function init() { int startIndex = 1; @@ -2942,7 +2928,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -2950,10 +2936,10 @@ function init() { } Test-Case: output -Description: Test range expression (exclusive) with iterable object when value of the first expression is a +Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative integer and value of the second expression is a negative Signed32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, iterable-object, list-constructor-expr, + object-type, optional-type, range-expr, record-type, unary-minus function init() { int startIndex = -10; @@ -2969,7 +2955,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -2977,10 +2963,10 @@ function init() { } Test-Case: output -Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative +Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, iterable-object, list-constructor-expr, + object-type, optional-type, range-expr, record-type, unary-minus function init() { int startIndex = -10; @@ -2996,7 +2982,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -3004,10 +2990,10 @@ function init() { } Test-Case: output -Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive +Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned8, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned8, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int startIndex = 1; @@ -3023,7 +3009,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -3031,10 +3017,10 @@ function init() { } Test-Case: output -Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative +Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned8, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned8, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus function init() { int startIndex = -10; @@ -3050,7 +3036,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -3058,11 +3044,10 @@ function init() { } Test-Case: output -Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive +Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive integer and value of the second expression is a byte. -Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, byte, - additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, iterable-object, list-constructor-expr, + object-type, optional-type, range-expr, record-type function init() { int startIndex = 1; @@ -3078,7 +3063,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -3088,9 +3073,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative integer and value of the second expression is a byte. -Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, byte, - additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, iterable-object, list-constructor-expr, + object-type, optional-type, range-expr, record-type, unary-minus function init() { int startIndex = -10; @@ -3106,7 +3090,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -3116,8 +3100,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned16, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned16, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int startIndex = 1; @@ -3133,7 +3117,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -3143,8 +3127,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned16, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned16, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus function init() { int startIndex = -10; @@ -3160,7 +3144,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -3170,8 +3154,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned32, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned32, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int startIndex = 1; @@ -3187,7 +3171,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -3197,8 +3181,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned32, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned32, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus function init() { int startIndex = -10; @@ -3214,7 +3198,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -3224,8 +3208,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed8 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, iterable-object, list-constructor-expr, + object-type, optional-type, range-expr, record-type function init() { int:Signed8 startIndex = 1; @@ -3241,7 +3225,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -3251,8 +3235,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a negative integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, iterable-object, list-constructor-expr, + object-type, optional-type, range-expr, record-type, unary-minus function init() { int:Signed8 startIndex = -10; @@ -3268,7 +3252,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -3278,8 +3262,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, iterable-object, list-constructor-expr, + object-type, optional-type, range-expr, record-type, unary-minus function init() { int:Signed8 startIndex = -10; @@ -3295,7 +3279,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -3305,8 +3289,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed8 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, int:Signed16, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed8, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int:Signed8 startIndex = 1; @@ -3322,7 +3306,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -3332,8 +3316,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a negative Signed16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed8, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus function init() { int:Signed8 startIndex = -10; @@ -3349,7 +3333,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -3359,8 +3343,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed8, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus function init() { int:Signed8 startIndex = -10; @@ -3376,7 +3360,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -3386,8 +3370,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed8 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, int:Signed32, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Signed8, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int:Signed8 startIndex = 1; @@ -3404,7 +3388,7 @@ function init() { foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -3414,8 +3398,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a negative Signed32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Signed8, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus function init() { int:Signed8 startIndex = -10; @@ -3431,7 +3415,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -3441,8 +3425,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Signed8, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus function init() { int:Signed8 startIndex = -10; @@ -3458,7 +3442,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -3468,8 +3452,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed8 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, int:Unsigned8, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, int:Unsigned8, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int:Signed8 startIndex = 1; @@ -3486,7 +3470,7 @@ function init() { foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -3496,8 +3480,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, int:Unsigned8, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, int:Unsigned8, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus function init() { int:Signed8 startIndex = -10; @@ -3513,7 +3497,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -3523,9 +3507,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed8 integer and value of the second expression is a byte. -Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, byte, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, int:Signed8, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int:Signed8 startIndex = 1; @@ -3541,7 +3524,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -3551,9 +3534,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a byte. -Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, byte, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, int:Signed8, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus function init() { int:Signed8 startIndex = -10; @@ -3569,7 +3551,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -3579,8 +3561,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed8 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, int:Unsigned16, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, int:Unsigned16, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int:Signed8 startIndex = 1; @@ -3596,7 +3578,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -3606,8 +3588,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, int:Unsigned16, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, int:Unsigned16, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus function init() { int:Signed8 startIndex = -10; @@ -3623,7 +3605,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -3631,10 +3613,10 @@ function init() { } Test-Case: output -Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive +Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed8 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, int:Unsigned32, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, int:Unsigned32, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int:Signed8 startIndex = 1; @@ -3650,7 +3632,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -3660,8 +3642,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, int:Unsigned32, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, int:Unsigned32, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus function init() { int:Signed8 startIndex = -10; @@ -3677,7 +3659,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -3687,8 +3669,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed16 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, iterable-object, list-constructor-expr, + object-type, optional-type, range-expr, record-type function init() { int:Signed16 startIndex = 1; @@ -3704,7 +3686,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -3714,8 +3696,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a negative integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, iterable-object, list-constructor-expr, + object-type, optional-type, range-expr, record-type, unary-minus function init() { int:Signed16 startIndex = -10; @@ -3731,7 +3713,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -3741,8 +3723,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, iterable-object, list-constructor-expr, + object-type, optional-type, range-expr, record-type, unary-minus function init() { int:Signed16 startIndex = -10; @@ -3758,7 +3740,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -3768,8 +3750,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed16 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, int:Signed8, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed8, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int:Signed16 startIndex = 1; @@ -3785,7 +3767,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -3795,8 +3777,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a negative Signed8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed8, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus function init() { int:Signed16 startIndex = -10; @@ -3812,7 +3794,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -3822,8 +3804,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed8, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus function init() { int:Signed16 startIndex = -10; @@ -3839,7 +3821,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -3849,8 +3831,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed16 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, int:Signed32, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed32, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int:Signed16 startIndex = 1; @@ -3866,7 +3848,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -3876,8 +3858,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a negative Signed32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed32, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus function init() { int:Signed16 startIndex = -10; @@ -3893,7 +3875,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -3903,8 +3885,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed32, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus function init() { int:Signed16 startIndex = -10; @@ -3920,7 +3902,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -3930,8 +3912,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed16 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, int:Unsigned8, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Unsigned8, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int:Signed16 startIndex = 1; @@ -3947,7 +3929,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -3957,8 +3939,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, int:Unsigned8, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Unsigned8, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus function init() { int:Signed16 startIndex = -10; @@ -3974,7 +3956,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -3984,9 +3966,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed16 integer and value of the second expression is a byte. -Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, byte, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, int:Signed16, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int:Signed16 startIndex = 1; @@ -4002,7 +3983,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -4012,9 +3993,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a byte. -Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, byte, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, int:Signed16, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus function init() { int:Signed16 startIndex = -10; @@ -4030,7 +4010,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -4040,8 +4020,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed16 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, int:Unsigned16, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Unsigned16, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int:Signed16 startIndex = 1; @@ -4057,7 +4037,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -4067,8 +4047,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, int:Unsigned16, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Unsigned16, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus function init() { int:Signed16 startIndex = -10; @@ -4084,7 +4064,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -4094,8 +4074,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed16 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, int:Unsigned32, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Unsigned32, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int:Signed16 startIndex = 1; @@ -4111,7 +4091,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -4121,8 +4101,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, int:Unsigned32, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Unsigned32, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus function init() { int:Signed16 startIndex = -10; @@ -4138,7 +4118,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -4148,8 +4128,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed32 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed32, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, iterable-object, list-constructor-expr, + object-type, optional-type, range-expr, record-type function init() { int:Signed32 startIndex = 1; @@ -4165,7 +4145,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -4175,8 +4155,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a negative integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, iterable-object, list-constructor-expr, + object-type, optional-type, range-expr, record-type, unary-minus function init() { int:Signed32 startIndex = -10; @@ -4192,7 +4172,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -4202,8 +4182,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, iterable-object, list-constructor-expr, + object-type, optional-type, range-expr, record-type, unary-minus function init() { int:Signed32 startIndex = -10; @@ -4219,7 +4199,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -4229,8 +4209,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed32 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed32, int:Signed8, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Signed8, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int:Signed32 startIndex = 1; @@ -4246,7 +4226,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -4256,8 +4236,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a negative Signed8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed32, int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Signed8, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus function init() { int:Signed32 startIndex = -10; @@ -4273,7 +4253,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -4283,8 +4263,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed32, int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Signed8, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus function init() { int:Signed32 startIndex = -10; @@ -4300,7 +4280,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -4310,8 +4290,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed32 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed32, int:Signed16, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed32, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int:Signed32 startIndex = 1; @@ -4327,7 +4307,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -4337,8 +4317,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a negative Signed16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed32, int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed32, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus function init() { int:Signed32 startIndex = -10; @@ -4354,7 +4334,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -4364,8 +4344,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed32, int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed32, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus function init() { int:Signed32 startIndex = -10; @@ -4381,7 +4361,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -4391,8 +4371,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed32 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed32, int:Unsigned8, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Unsigned8, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int:Signed32 startIndex = 1; @@ -4408,7 +4388,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -4418,8 +4398,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed32, int:Unsigned8, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Unsigned8, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus function init() { int:Signed32 startIndex = -10; @@ -4435,7 +4415,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -4445,9 +4425,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed32 integer and value of the second expression is a byte. -Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed32, bye, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, int:Signed32, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int:Signed32 startIndex = 1; @@ -4463,7 +4442,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -4473,9 +4452,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a byte. -Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed32, byte, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, int:Signed32, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus function init() { int:Signed32 startIndex = -10; @@ -4491,7 +4469,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -4501,8 +4479,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed32 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed32, int:Unsigned16, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Unsigned16, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int:Signed32 startIndex = 1; @@ -4518,7 +4496,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -4528,8 +4506,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed32, int:Unsigned16, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Unsigned16, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus function init() { int:Signed32 startIndex = -10; @@ -4545,7 +4523,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -4555,8 +4533,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed32 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed32, int:Unsigned32, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Unsigned32, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int:Signed32 startIndex = 1; @@ -4572,7 +4550,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -4582,8 +4560,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed32, int:Unsigned32, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Unsigned32, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus function init() { int:Signed32 startIndex = -10; @@ -4599,7 +4577,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -4609,8 +4587,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned8 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned8, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned8, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int:Unsigned8 startIndex = 1; @@ -4626,7 +4604,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -4636,8 +4614,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned8 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned8, int:Signed8, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, int:Unsigned8, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int:Unsigned8 startIndex = 1; @@ -4654,7 +4632,7 @@ function init() { foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -4664,8 +4642,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned8 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned8, int:Signed16, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Unsigned8, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int:Unsigned8 startIndex = 1; @@ -4681,7 +4659,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -4691,8 +4669,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned8 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned8, int:Signed32, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Unsigned8, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int:Unsigned8 startIndex = 1; @@ -4708,7 +4686,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -4718,9 +4696,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned8 integer and value of the second expression is a byte. -Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned8, byte, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, int:Unsigned8, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int:Unsigned8 startIndex = 1; @@ -4736,7 +4713,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -4746,8 +4723,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned8 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned8, int:Unsigned16, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned16, int:Unsigned8, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int:Unsigned8 startIndex = 1; @@ -4763,7 +4740,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -4773,8 +4750,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned8 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned8, int:Unsigned32, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned32, int:Unsigned8, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int:Unsigned8 startIndex = 1; @@ -4791,7 +4768,7 @@ function init() { foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -4801,8 +4778,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned16 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned16, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned16, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int:Unsigned16 startIndex = 1; @@ -4818,7 +4795,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -4828,8 +4805,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned16 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned16, int:Signed8, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, int:Unsigned16, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int:Unsigned16 startIndex = 1; @@ -4845,7 +4822,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -4855,8 +4832,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned16 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned16, int:Signed16, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Unsigned16, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int:Unsigned16 startIndex = 1; @@ -4872,7 +4849,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -4882,8 +4859,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned16 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned16, int:Signed32, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Unsigned16, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int:Unsigned16 startIndex = 1; @@ -4899,7 +4876,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -4909,8 +4886,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned16 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned16, int:Unsigned8, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned16, int:Unsigned8, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int:Unsigned16 startIndex = 1; @@ -4927,7 +4904,7 @@ function init() { foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -4937,9 +4914,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned16 integer and value of the second expression is a byte. -Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned16, byte, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, int:Unsigned16, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int:Unsigned16 startIndex = 1; @@ -4955,7 +4931,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -4965,8 +4941,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned16 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned16, int:Unsigned32, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned16, int:Unsigned32, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int:Unsigned16 startIndex = 1; @@ -4982,7 +4958,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -4992,8 +4968,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned32 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned32, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned32, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int:Unsigned32 startIndex = 1; @@ -5009,7 +4985,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -5019,8 +4995,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned32 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned32, int:Signed8, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, int:Unsigned32, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int:Unsigned32 startIndex = 1; @@ -5036,7 +5012,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -5046,8 +5022,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned32 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned32, int:Signed16, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Unsigned32, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int:Unsigned32 startIndex = 1; @@ -5063,7 +5039,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -5073,8 +5049,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned32 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned32, int:Signed32, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Unsigned32, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int:Unsigned32 startIndex = 1; @@ -5090,7 +5066,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -5100,8 +5076,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned32 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned32, int:Unsigned8, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned32, int:Unsigned8, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int:Unsigned32 startIndex = 1; @@ -5117,7 +5093,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -5127,9 +5103,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned32 integer and value of the second expression is a byte. -Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned32, byte, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, int:Unsigned32, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int:Unsigned32 startIndex = 1; @@ -5145,7 +5120,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -5155,8 +5130,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned32 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned32, int:Unsigned16, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned16, int:Unsigned32, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int:Unsigned32 startIndex = 1; @@ -5172,7 +5147,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -5180,11 +5155,10 @@ function init() { } Test-Case: output -Description: Test range expression (exclusive) with iterable object when values of both expressions are of +Description: Test range expression (exclusive) with iterable object when values of both expressions are of user-defined subtypes of int. -Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - singleton-type, union-type, module-type-decl, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-object, list-constructor-expr, + module-type-defn, object-type, optional-type, range-expr, record-type, singleton-type, union-type type Ints 1|10; @@ -5202,7 +5176,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -5210,11 +5184,10 @@ function init() { } Test-Case: output -Description: Test range expression (exclusive) with iterable object when values of both expressions are of union of +Description: Test range expression (exclusive) with iterable object when values of both expressions are of union of int subtypes. -Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, int:Unsigned32, union-type, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, int:Unsigned32, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type, union-type function init() { int:Signed8|int:Unsigned32 startIndex = 1; @@ -5230,7 +5203,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -5240,8 +5213,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when the value of the first expression and the value of the second expression is equal. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-object, list-constructor-expr, object-type, + optional-type, range-expr, record-type function init() { int startIndex = 5; @@ -5257,7 +5230,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 0 @@ -5267,8 +5240,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when the value of the first expression is less than the value of the second expression. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-object, list-constructor-expr, object-type, + optional-type, range-expr, record-type function init() { int startIndex = 5; @@ -5284,7 +5257,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 0 @@ -5293,8 +5266,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when the types of the expressions are inferred. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - additive-expr, object-type, record-type, optional-type, var +Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-object, list-constructor-expr, object-type, + optional-type, range-expr, record-type, var function init() { var startIndex = 1; @@ -5310,7 +5283,7 @@ function init() { } range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -5319,8 +5292,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when the types of the expressions and type of the range expression are inferred. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - additive-expr, var +Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-object, list-constructor-expr, range-expr, + var function init() { var startIndex = 1; @@ -5331,7 +5304,7 @@ function init() { var range = startIndex ..< endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -5340,8 +5313,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) at module level. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - additive-expr, object-type, record-type, optional-type, var +Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-object, list-constructor-expr, object-type, + optional-type, range-expr, record-type, var int startIndex = 1; int endIndex = 10; @@ -5358,7 +5331,7 @@ function init() { int[] arr = []; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -5367,8 +5340,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) at module level. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - additive-expr, var +Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-object, list-constructor-expr, range-expr, + var int startIndex = 1; int endIndex = 10; @@ -5380,7 +5353,7 @@ function init() { int[] arr = []; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -5389,8 +5362,8 @@ function init() { Test-Case: output Description: Test iterable object returned by the range expression (exclusive). -Labels: range-expr, array-type, list-constructor-expr, array:push, int, DecimalNumber, object-type, - optional-type, var, value:toBalString, method-call-expr +Labels: array-type, array:push, DecimalNumber, int, list-constructor-expr, method-call-expr, object-type, optional-type, + range-expr, value:toBalString, var function init() { object { @@ -5416,9 +5389,9 @@ function init() { Test-Case: output Description: Test field and member access as expressions in range expression (exclusive). -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, field-access-expr, - DecimalNumber, int, mapping-constructor-expr, member-access-expr, module-type-defn, object-type, record-type, - optional-type, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, field-access-expr, int, iterable-object, + list-constructor-expr, mapping-constructor-expr, member-access-expr, module-type-defn, object-type, + optional-type, range-expr, record-type type Record record { int x; @@ -5438,7 +5411,7 @@ function init() { } range = c.x ..< d[0]; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 20 @@ -5447,9 +5420,9 @@ function init() { Test-Case: output Description: Test function and method call as expressions in range expression (exclusive). -Labels: range-expr, iterable-object, DecimalNumber, array-type, list-constructor-expr, array:push, - int, explicit-new-expr, function-call-expr, module-class-defn, method-call-expr, object-type, record-type, - optional-type, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, explicit-new-expr, function-call-expr, int, + iterable-object, list-constructor-expr, method-call-expr, module-class-defn, object-type, optional-type, + range-expr, record-type class Class { function getInt() returns int { @@ -5470,7 +5443,7 @@ function init() { } range = cls.getInt() ..< getInt(); foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -5483,8 +5456,8 @@ function getInt() returns int { Test-Case: output Description: Test type cast expression as expressions in range expression (exclusive). -Labels: range-expr, iterable-object, DecimalNumber, array-type, list-constructor-expr, array:push, - int, type-cast-expr, object-type, record-type, optional-type, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-object, list-constructor-expr, object-type, + optional-type, range-expr, record-type, type-cast-expr function init() { int count = 0; @@ -5498,7 +5471,7 @@ function init() { } range = 1.0 ..< 10.0; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -5507,8 +5480,8 @@ function init() { Test-Case: output Description: Test unary expressions as expressions in range expression (exclusive). -Labels: range-expr, iterable-object, DecimalNumber, array-type, list-constructor-expr, array:push, - int, unary-complement, unary-minus, unary-plus, object-type, record-type, optional-type, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-object, list-constructor-expr, object-type, + optional-type, range-expr, record-type, unary-complement, unary-minus, unary-plus function init() { int count = 0; @@ -5522,7 +5495,7 @@ function init() { } range = -10 ..< +2; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -5533,7 +5506,7 @@ function init() { range = -10 ..< ~2; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 7 @@ -5542,8 +5515,8 @@ function init() { Test-Case: output Description: Test additive expression as expressions in range expression (exclusive). -Labels: range-expr, iterable-object, additive-expr, array-type, list-constructor-expr, array:push, int, - DecimalNumber, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-object, list-constructor-expr, object-type, + optional-type, range-expr, record-type function init() { int count = 0; @@ -5557,7 +5530,7 @@ function init() { } range = 0+1 ..< 12-2; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 9 @@ -5566,8 +5539,8 @@ function init() { Test-Case: output Description: Test multiplicative expressions as expressions in range expression (exclusive). -Labels: range-expr, iterable-object, additive-expr, DecimalNumber, array-type, list-constructor-expr, - array:push, int, multiplicative-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-object, list-constructor-expr, + multiplicative-expr, object-type, optional-type, range-expr, record-type function init() { int count = 0; @@ -5581,7 +5554,7 @@ function init() { } range = 1*2 ..< 36/4; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 7 @@ -5592,7 +5565,7 @@ function init() { range = 34%5 ..< 4*5; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 16 @@ -5601,8 +5574,8 @@ function init() { Test-Case: output Description: Test binary bitwise expressions as expressions in range expression (exclusive). -Labels: range-expr, iterable-object, binary-bitwise-expr, DecimalNumber, array-type, list-constructor-expr, - array:push, int, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, binary-bitwise-expr, DecimalNumber, int, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int count = 0; @@ -5616,7 +5589,7 @@ function init() { } range = (1&2) ..< (4|8); foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 12 @@ -5627,7 +5600,7 @@ function init() { range = (6|3) ..< (2^8); foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 3 @@ -5636,8 +5609,8 @@ function init() { Test-Case: output Description: Test checking expressions as expressions in range expression (exclusive). -Labels: range-expr, iterable-object, check, checkpanic, DecimalNumber, error, additive-expr, array-type, - list-constructor-expr, array:push, int, union-type, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, check, checkpanic, DecimalNumber, error, int, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type, union-type function init() returns error? { int|error startIndex = 2; @@ -5653,7 +5626,7 @@ function init() returns error? { } range = check startIndex ..< checkpanic endIndex; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 10 @@ -5662,8 +5635,8 @@ function init() returns error? { Test-Case: output Description: Test let expression as expressions in range expression (exclusive). -Labels: range-expr, iterable-object, DecimalNumber, array-type, list-constructor-expr, array:push, int, let-expr, - additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-object, let-expr, list-constructor-expr, + object-type, optional-type, range-expr, record-type function init() { int count = 0; @@ -5677,7 +5650,7 @@ function init() { } range = (let int h1 = 10 in h1) ..< (let int h1 = 25 in h1); foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 15 @@ -5686,8 +5659,8 @@ function init() { Test-Case: output Description: Test shift expressions as expressions in range expression (exclusive). -Labels: range-expr, iterable-object, DecimalNumber, array-type, list-constructor-expr, array:push, int, - shift-expr, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-object, list-constructor-expr, object-type, + optional-type, range-expr, record-type, shift-expr function init() { int count = 0; @@ -5701,7 +5674,7 @@ function init() { } range = 1<<2 ..< 100>>4; foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 2 @@ -5710,8 +5683,8 @@ function init() { Test-Case: output Description: Test conditional expressions as expressions in range expression (exclusive). -Labels: range-expr, iterable-object, conditional-expr, DecimalNumber, error, array-type, list-constructor-expr, - array:push, int, additive-expr, nil-literal, optional-type, union-type, object-type, record-type +Labels: additive-expr, array-type, array:push, conditional-expr, DecimalNumber, error, int, iterable-object, + list-constructor-expr, nil-literal, object-type, optional-type, range-expr, record-type, union-type function init() { int|error a = 10; @@ -5727,7 +5700,7 @@ function init() { } range = (a is error ? 5 : a) ..< (b ?: 25); foreach int i in range { - arr.push(i); + arr.push(i); count = count + 1; } io:println(count); // @output 15 @@ -5736,8 +5709,8 @@ function init() { Test-Case: output Description: Test lang.int constants as expressions in range expression (exclusive). -Labels: range-expr, iterable-object, int, DecimalNumber, int:SIGNED8_MAX_VALUE, int:UNSIGNED8_MAX_VALUE, additive-expr, - object-type, record-type, optional-type +Labels: additive-expr, DecimalNumber, int, int:SIGNED8_MAX_VALUE, int:UNSIGNED8_MAX_VALUE, iterable-object, object-type, + optional-type, range-expr, record-type function init() { int count = 0; @@ -5757,9 +5730,8 @@ function init() { Test-Case: output Description: Test isolatedness of range expression (exclusive). -Fail-Issue: ballerina-platform/ballerina-lang#33163 -Labels: range-expr, iterable-object, object-type, additive-expr, array-type, list-constructor-expr, array:push, - int, DecimalNumber, function-call-expr, record-type, optional-type, lock-stmt +Labels: additive-expr, array-type, array:push, DecimalNumber, function-call-expr, int, iterable-object, + list-constructor-expr, lock-stmt, object-type, optional-type, range-expr, record-type isolated int j = 1; @@ -5767,11 +5739,11 @@ function init() { int count = 0; int[] arr = []; foreach int i in getRange() { - arr.push(i); + arr.push(i); count = count + 1; } - io:println(count); // @output 10 - io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] + io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } function getRange() returns object { @@ -5787,9 +5759,8 @@ function getRange() returns object { Test-Case: output Description: Test isolatedness of the resultant object of the range expression (exclusive). -Fail-Issue: ballerina-platform/ballerina-lang#33163 -Labels: range-expr, object-type, record-type, array-type, list-constructor-expr, array:push, int, optional-type, - is-expr, any, type-cast-expr +Labels: any, array-type, array:push, int, is-expr, list-constructor-expr, object-type, optional-type, range-expr, + record-type, type-cast-expr function init() { object { @@ -5804,25 +5775,24 @@ function init() { Test-Case: output Description: Test isolatedness of the iterator() and next() methods of range expression (exclusive). -Fail-Issue: ballerina-platform/ballerina-lang#33163 -Labels: range-expr, object-type, array-type, list-constructor-expr, array:push, int, DecimalNumber, record-type, - optional-type, is-expr, method-call-expr +Labels: array-type, array:push, DecimalNumber, int, is-expr, list-constructor-expr, method-call-expr, object-type, + optional-type, range-expr, record-type -function init() { - object { - public isolated function iterator() returns (object { - public isolated function next() returns (record {|int value;|}?); - }); - } range = 1 ..< 10; +type IsolatedIterable isolated object { + public isolated function iterator() returns isolated object { + public isolated function next() returns record {| int value; |}?; + }; +}; +function init() { + object {} range = 1 ..< 10; - io:println(range.iterator() is isolated function); // @output true - io:println(range.iterator().next() is isolated function); // @output true + io:println(range is IsolatedIterable); // @output true } Test-Case: output Description: Test range expression (exclusive) with query expression. -Labels: range-expr, array-type, list-constructor-expr, array:push, int, DecimalNumber, query-expr +Labels: array-type, array:push, DecimalNumber, int, list-constructor-expr, query-expr, range-expr function init() { int[] a = from int i in 1 ..< 10 @@ -5833,7 +5803,7 @@ function init() { Test-Case: error Description: Test range expression (exclusive) when static type of either of the expression is not a subtype of int. -Labels: range-expr, int, DecimalFloatingPointNumber, string +Labels: DecimalFloatingPointNumber, int, range-expr, string function init() { _ = 1.0 ..< 10; // @error ..< not defined when static type of either of the expression is not a subtype of int @@ -5847,7 +5817,7 @@ function init() { Test-Case: error Description: Test assigning the result of range expression (exclusive) to an incompatible type. -Labels: range-expr, int, DecimalNumber, object-type, float, record-type, optional-type +Labels: DecimalNumber, float, int, object-type, optional-type, range-expr, record-type function init() { int _ = 1 ..< 10; // @error expects an int, but the result of a range expression is an object @@ -5862,7 +5832,7 @@ function init() { Test-Case: error Description: Test assigning the result of range expression (exclusive) to an incompatible type when the static type of the range expression is inferred. -Labels: range-expr, int, DecimalNumber, object-type, var, record-type, optional-type, float +Labels: DecimalNumber, float, int, object-type, optional-type, range-expr, record-type, var function init() { var a = 1 ..< 10; diff --git a/conformance/lang/expressions/range-expr/range_expr_inclusive.balt b/conformance/lang/expressions/range-expr/range_expr_inclusive.balt index 7e73e303..425d1221 100644 --- a/conformance/lang/expressions/range-expr/range_expr_inclusive.balt +++ b/conformance/lang/expressions/range-expr/range_expr_inclusive.balt @@ -1,7 +1,6 @@ Test-Case: output Description: Test range expression (inclusive) when values of both expressions are positive integers. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-inclusive, list-constructor-expr, range-expr function init() { int startIndex = 0; @@ -18,8 +17,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when values of both expressions are negative integers. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-inclusive, list-constructor-expr, + range-expr, unary-minus function init() { int startIndex = -6; @@ -37,8 +36,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when the value of one expression is a negative integer and the value of the other expression is a positive integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-inclusive, list-constructor-expr, + range-expr, unary-minus function init() { int startIndex = -10; @@ -56,8 +55,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when the value of one expression is a negative integer and the value of the other expression is a positive integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-inclusive, list-constructor-expr, + range-expr, unary-minus function init() { int startIndex = -7635315; @@ -71,8 +70,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when values of both expressions are positive Signed8 integers. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, iterable-inclusive, + list-constructor-expr, range-expr function init() { int:Signed8 startIndex = 1; @@ -89,8 +88,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when values of both expressions are negative Signed8 integers. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, iterable-inclusive, + list-constructor-expr, range-expr, unary-minus function init() { int:Signed8 startIndex = -10; @@ -108,8 +107,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when the value of one expression is a negative Signed8 integer and the value of the other expression is a positive Signed8 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, iterable-inclusive, + list-constructor-expr, range-expr, unary-minus function init() { int:Signed8 startIndex = -10; @@ -126,8 +125,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when values of both expressions are positive Signed16 integers. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, iterable-inclusive, + list-constructor-expr, range-expr function init() { int:Signed16 startIndex = 1; @@ -144,8 +143,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when values of both expressions are negative Signed16 integers. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, iterable-inclusive, + list-constructor-expr, range-expr, unary-minus function init() { int:Signed16 startIndex = -10; @@ -163,8 +162,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when the value of one expression is a negative Signed16 integer and the value of the other expression is a positive Signed16 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, iterable-inclusive, + list-constructor-expr, range-expr, unary-minus function init() { int:Signed16 startIndex = -10; @@ -181,8 +180,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when values of both expressions are positive Signed32 integers. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed32, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, iterable-inclusive, + list-constructor-expr, range-expr function init() { int:Signed32 startIndex = 1; @@ -199,8 +198,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when values of both expressions are negative Signed32 integers. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed32, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, iterable-inclusive, + list-constructor-expr, range-expr, unary-minus function init() { int:Signed32 startIndex = -10; @@ -218,8 +217,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when the value of one expression is a negative Signed32 integer and the value of the other expression is a positive Signed32 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed32, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, iterable-inclusive, + list-constructor-expr, range-expr, unary-minus function init() { int:Signed32 startIndex = -10; @@ -236,8 +235,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when values of both expressions are Unsigned8 integers. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned8, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned8, iterable-inclusive, + list-constructor-expr, range-expr function init() { int:Unsigned8 startIndex = 1; @@ -254,8 +253,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when values of both expressions are Unsigned16 integers. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned16, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned16, iterable-inclusive, + list-constructor-expr, range-expr function init() { int:Unsigned16 startIndex = 1; @@ -272,8 +271,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when values of both expressions are Unsigned32 integers. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned32, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned32, iterable-inclusive, + list-constructor-expr, range-expr function init() { int:Unsigned32 startIndex = 1; @@ -291,8 +290,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, iterable-inclusive, + list-constructor-expr, range-expr function init() { int startIndex = 1; @@ -310,8 +309,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative integer and value of the second expression is a negative Signed8 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, iterable-inclusive, + list-constructor-expr, range-expr, unary-minus function init() { int startIndex = -10; @@ -329,8 +328,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, iterable-inclusive, + list-constructor-expr, range-expr, unary-minus function init() { int startIndex = -10; @@ -349,8 +348,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, iterable-inclusive, + list-constructor-expr, range-expr function init() { int startIndex = 1; @@ -368,8 +367,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative integer and value of the second expression is a negative Signed16 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, iterable-inclusive, + list-constructor-expr, range-expr, unary-minus function init() { int startIndex = -10; @@ -387,8 +386,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, iterable-inclusive, + list-constructor-expr, range-expr, unary-minus function init() { int startIndex = -10; @@ -406,8 +405,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed32, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, iterable-inclusive, + list-constructor-expr, range-expr function init() { int startIndex = 1; @@ -425,8 +424,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative integer and value of the second expression is a negative Signed32 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed32, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, iterable-inclusive, + list-constructor-expr, range-expr, unary-minus function init() { int startIndex = -10; @@ -444,8 +443,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed32, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, iterable-inclusive, + list-constructor-expr, range-expr, unary-minus function init() { int startIndex = -10; @@ -463,8 +462,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned8, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned8, iterable-inclusive, + list-constructor-expr, range-expr function init() { int startIndex = 1; @@ -482,8 +481,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned8, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned8, iterable-inclusive, + list-constructor-expr, range-expr, unary-minus function init() { int startIndex = -10; @@ -501,9 +500,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive integer and value of the second expression is a byte. -Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - byte, additive-expr +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, iterable-inclusive, list-constructor-expr, + range-expr function init() { int startIndex = 1; @@ -521,9 +519,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative integer and value of the second expression is a byte. -Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - byte, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, iterable-inclusive, list-constructor-expr, + range-expr, unary-minus function init() { int startIndex = -10; @@ -541,8 +538,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned16, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned16, iterable-inclusive, + list-constructor-expr, range-expr function init() { int startIndex = 1; @@ -560,8 +557,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned16, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned16, iterable-inclusive, + list-constructor-expr, range-expr, unary-minus function init() { int startIndex = -10; @@ -579,8 +576,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned32, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned32, iterable-inclusive, + list-constructor-expr, range-expr function init() { int startIndex = 1; @@ -598,8 +595,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned32, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned32, iterable-inclusive, + list-constructor-expr, range-expr, unary-minus function init() { int startIndex = -10; @@ -617,8 +614,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive Signed8 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, iterable-inclusive, + list-constructor-expr, range-expr function init() { int:Signed8 startIndex = 1; @@ -636,8 +633,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a negative integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, iterable-inclusive, + list-constructor-expr, range-expr, unary-minus function init() { int:Signed8 startIndex = -10; @@ -655,8 +652,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, iterable-inclusive, + list-constructor-expr, range-expr, unary-minus function init() { int:Signed8 startIndex = -10; @@ -674,8 +671,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive Signed8 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, int:Signed16, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed8, iterable-inclusive, + list-constructor-expr, range-expr function init() { int:Signed8 startIndex = 1; @@ -693,8 +690,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a negative Signed16 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, int:Signed16, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed8, iterable-inclusive, + list-constructor-expr, range-expr, unary-minus function init() { int:Signed8 startIndex = -10; @@ -712,8 +709,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, int:Signed16, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed8, iterable-inclusive, + list-constructor-expr, range-expr, unary-minus function init() { int:Signed8 startIndex = -10; @@ -731,8 +728,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive Signed8 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, int:Signed32, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Signed8, iterable-inclusive, + list-constructor-expr, range-expr function init() { int:Signed8 startIndex = 1; @@ -750,8 +747,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a negative Signed32 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, int:Signed32, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Signed8, iterable-inclusive, + list-constructor-expr, range-expr, unary-minus function init() { int:Signed8 startIndex = -10; @@ -769,8 +766,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, int:Signed32, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Signed8, iterable-inclusive, + list-constructor-expr, range-expr, unary-minus function init() { int:Signed8 startIndex = -10; @@ -788,8 +785,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive Signed8 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, int:Unsigned8, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, int:Unsigned8, iterable-inclusive, + list-constructor-expr, range-expr function init() { int:Signed8 startIndex = 1; @@ -807,8 +804,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, int:Unsigned8, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, int:Unsigned8, iterable-inclusive, + list-constructor-expr, range-expr, unary-minus function init() { int:Signed8 startIndex = -10; @@ -826,9 +823,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive Signed8 integer and value of the second expression is a byte. -Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, byte, additive-expr +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, int:Signed8, iterable-inclusive, + list-constructor-expr, range-expr function init() { int:Signed8 startIndex = 1; @@ -846,9 +842,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a byte. -Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, byte, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, int:Signed8, iterable-inclusive, + list-constructor-expr, range-expr, unary-minus function init() { int:Signed8 startIndex = -10; @@ -866,8 +861,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive Signed8 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, int:Unsigned16, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, int:Unsigned16, iterable-inclusive, + list-constructor-expr, range-expr function init() { int:Signed8 startIndex = 1; @@ -885,8 +880,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, int:Unsigned16, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, int:Unsigned16, iterable-inclusive, + list-constructor-expr, range-expr, unary-minus function init() { int:Signed8 startIndex = -10; @@ -904,8 +899,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive Signed8 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, int:Unsigned32, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, int:Unsigned32, iterable-inclusive, + list-constructor-expr, range-expr function init() { int:Signed8 startIndex = 1; @@ -923,8 +918,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, int:Unsigned32, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, int:Unsigned32, iterable-inclusive, + list-constructor-expr, range-expr, unary-minus function init() { int:Signed8 startIndex = -10; @@ -942,8 +937,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive Signed16 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, iterable-inclusive, + list-constructor-expr, range-expr function init() { int:Signed16 startIndex = 1; @@ -961,8 +956,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a negative integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, iterable-inclusive, + list-constructor-expr, range-expr, unary-minus function init() { int:Signed16 startIndex = -10; @@ -980,8 +975,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, iterable-inclusive, + list-constructor-expr, range-expr, unary-minus function init() { int:Signed16 startIndex = -10; @@ -999,8 +994,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive Signed16 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, int:Signed16, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed8, iterable-inclusive, + list-constructor-expr, range-expr function init() { int:Signed16 startIndex = 1; @@ -1018,8 +1013,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a negative Signed8 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, int:Signed16, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed8, iterable-inclusive, + list-constructor-expr, range-expr, unary-minus function init() { int:Signed16 startIndex = -10; @@ -1037,8 +1032,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, int:Signed16, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed8, iterable-inclusive, + list-constructor-expr, range-expr, unary-minus function init() { int:Signed16 startIndex = -10; @@ -1056,8 +1051,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive Signed16 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, int:Signed32, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed32, iterable-inclusive, + list-constructor-expr, range-expr function init() { int:Signed16 startIndex = 1; @@ -1075,8 +1070,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a negative Signed32 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, int:Signed32, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed32, iterable-inclusive, + list-constructor-expr, range-expr, unary-minus function init() { int:Signed16 startIndex = -10; @@ -1094,8 +1089,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, int:Signed32, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed32, iterable-inclusive, + list-constructor-expr, range-expr, unary-minus function init() { int:Signed16 startIndex = -10; @@ -1113,8 +1108,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive Signed16 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, int:Unsigned8, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Unsigned8, iterable-inclusive, + list-constructor-expr, range-expr function init() { int:Signed16 startIndex = 1; @@ -1132,8 +1127,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, int:Unsigned8, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Unsigned8, iterable-inclusive, + list-constructor-expr, range-expr, unary-minus function init() { int:Signed16 startIndex = -10; @@ -1151,9 +1146,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive Signed16 integer and value of the second expression is a byte. -Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, byte, additive-expr +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, int:Signed16, iterable-inclusive, + list-constructor-expr, range-expr function init() { int:Signed16 startIndex = 1; @@ -1171,9 +1165,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a byte. -Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, byte, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, int:Signed16, iterable-inclusive, + list-constructor-expr, range-expr, unary-minus function init() { int:Signed16 startIndex = -10; @@ -1191,8 +1184,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive Signed16 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, int:Unsigned16, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Unsigned16, iterable-inclusive, + list-constructor-expr, range-expr function init() { int:Signed16 startIndex = 1; @@ -1210,8 +1203,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, int:Unsigned16, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Unsigned16, iterable-inclusive, + list-constructor-expr, range-expr, unary-minus function init() { int:Signed16 startIndex = -10; @@ -1229,8 +1222,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive Signed16 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, int:Unsigned32, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Unsigned32, iterable-inclusive, + list-constructor-expr, range-expr function init() { int:Signed16 startIndex = 1; @@ -1248,8 +1241,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, int:Unsigned32, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Unsigned32, iterable-inclusive, + list-constructor-expr, range-expr, unary-minus function init() { int:Signed16 startIndex = -10; @@ -1267,8 +1260,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive Signed32 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed32, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, iterable-inclusive, + list-constructor-expr, range-expr function init() { int:Signed32 startIndex = 1; @@ -1286,8 +1279,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a negative integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed32, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, iterable-inclusive, + list-constructor-expr, range-expr, unary-minus function init() { int:Signed32 startIndex = -10; @@ -1305,8 +1298,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed32, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, iterable-inclusive, + list-constructor-expr, range-expr, unary-minus function init() { int:Signed32 startIndex = -10; @@ -1324,8 +1317,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive Signed32 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, int:Signed32, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Signed8, iterable-inclusive, + list-constructor-expr, range-expr function init() { int:Signed32 startIndex = 1; @@ -1343,8 +1336,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a negative Signed8 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, int:Signed32, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Signed8, iterable-inclusive, + list-constructor-expr, range-expr, unary-minus function init() { int:Signed32 startIndex = -10; @@ -1362,8 +1355,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, int:Signed32, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Signed8, iterable-inclusive, + list-constructor-expr, range-expr, unary-minus function init() { int:Signed32 startIndex = -10; @@ -1381,8 +1374,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive Signed32 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, int:Signed32, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed32, iterable-inclusive, + list-constructor-expr, range-expr function init() { int:Signed32 startIndex = 1; @@ -1400,8 +1393,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a negative Signed16 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, int:Signed32, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed32, iterable-inclusive, + list-constructor-expr, range-expr, unary-minus function init() { int:Signed32 startIndex = -10; @@ -1419,8 +1412,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, int:Signed32, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed32, iterable-inclusive, + list-constructor-expr, range-expr, unary-minus function init() { int:Signed32 startIndex = -10; @@ -1438,8 +1431,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive Signed32 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed32, int:Unsigned8, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Unsigned8, iterable-inclusive, + list-constructor-expr, range-expr function init() { int:Signed32 startIndex = 1; @@ -1457,8 +1450,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed32, int:Unsigned8, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Unsigned8, iterable-inclusive, + list-constructor-expr, range-expr, unary-minus function init() { int:Signed32 startIndex = -10; @@ -1476,9 +1469,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive Signed32 integer and value of the second expression is a byte. -Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed32, byte, additive-expr +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, int:Signed32, iterable-inclusive, + list-constructor-expr, range-expr function init() { int:Signed32 startIndex = 1; @@ -1496,9 +1488,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a byte. -Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed32, byte, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, int:Signed32, iterable-inclusive, + list-constructor-expr, range-expr, unary-minus function init() { int:Signed32 startIndex = -10; @@ -1516,8 +1507,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive Signed32 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed32, int:Unsigned16, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Unsigned16, iterable-inclusive, + list-constructor-expr, range-expr function init() { int:Signed32 startIndex = 1; @@ -1535,8 +1526,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed32, int:Unsigned16, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Unsigned16, iterable-inclusive, + list-constructor-expr, range-expr, unary-minus function init() { int:Signed32 startIndex = -10; @@ -1554,8 +1545,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive Signed32 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed32, int:Unsigned32, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Unsigned32, iterable-inclusive, + list-constructor-expr, range-expr function init() { int:Signed32 startIndex = 1; @@ -1573,8 +1564,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed32, int:Unsigned32, unary-minus, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Unsigned32, iterable-inclusive, + list-constructor-expr, range-expr, unary-minus function init() { int:Signed32 startIndex = -10; @@ -1592,8 +1583,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a Unsigned8 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned8, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned8, iterable-inclusive, + list-constructor-expr, range-expr function init() { int:Unsigned8 startIndex = 1; @@ -1611,8 +1602,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a Unsigned8 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, int:Unsigned8, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, int:Unsigned8, iterable-inclusive, + list-constructor-expr, range-expr function init() { int:Unsigned8 startIndex = 1; @@ -1630,8 +1621,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a Unsigned8 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, int:Unsigned8, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Unsigned8, iterable-inclusive, + list-constructor-expr, range-expr function init() { int:Unsigned8 startIndex = 1; @@ -1649,8 +1640,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a Unsigned8 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed32, int:Unsigned8, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Unsigned8, iterable-inclusive, + list-constructor-expr, range-expr function init() { int:Unsigned8 startIndex = 1; @@ -1668,9 +1659,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a Unsigned8 integer and value of the second expression is a byte. -Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned8, byte, additive-expr +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, int:Unsigned8, iterable-inclusive, + list-constructor-expr, range-expr function init() { int:Unsigned8 startIndex = 1; @@ -1688,8 +1678,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a Unsigned8 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned8, int:Unsigned16, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned16, int:Unsigned8, iterable-inclusive, + list-constructor-expr, range-expr function init() { int:Unsigned8 startIndex = 1; @@ -1707,8 +1697,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a Unsigned8 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned8, int:Unsigned32, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned32, int:Unsigned8, iterable-inclusive, + list-constructor-expr, range-expr function init() { int:Unsigned8 startIndex = 1; @@ -1726,8 +1716,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a Unsigned16 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned16, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned16, iterable-inclusive, + list-constructor-expr, range-expr function init() { int:Unsigned16 startIndex = 1; @@ -1745,8 +1735,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a Unsigned16 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, int:Unsigned16, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, int:Unsigned16, iterable-inclusive, + list-constructor-expr, range-expr function init() { int:Unsigned16 startIndex = 1; @@ -1764,8 +1754,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a Unsigned16 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, int:Unsigned16, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Unsigned16, iterable-inclusive, + list-constructor-expr, range-expr function init() { int:Unsigned16 startIndex = 1; @@ -1783,8 +1773,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a Unsigned16 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed32, int:Unsigned16, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Unsigned16, iterable-inclusive, + list-constructor-expr, range-expr function init() { int:Unsigned16 startIndex = 1; @@ -1802,8 +1792,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a Unsigned16 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned8, int:Unsigned16, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned16, int:Unsigned8, iterable-inclusive, + list-constructor-expr, range-expr function init() { int:Unsigned16 startIndex = 1; @@ -1821,9 +1811,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a Unsigned16 integer and value of the second expression is a byte. -Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned16, byte, additive-expr +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, int:Unsigned16, iterable-inclusive, + list-constructor-expr, range-expr function init() { int:Unsigned16 startIndex = 1; @@ -1841,8 +1830,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a Unsigned16 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned16, int:Unsigned32, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned16, int:Unsigned32, iterable-inclusive, + list-constructor-expr, range-expr function init() { int:Unsigned16 startIndex = 1; @@ -1860,8 +1849,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a Unsigned32 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned32, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned32, iterable-inclusive, + list-constructor-expr, range-expr function init() { int:Unsigned32 startIndex = 1; @@ -1879,8 +1868,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a Unsigned32 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, int:Unsigned32, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, int:Unsigned32, iterable-inclusive, + list-constructor-expr, range-expr function init() { int:Unsigned32 startIndex = 1; @@ -1898,8 +1887,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a Unsigned32 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, int:Unsigned32, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Unsigned32, iterable-inclusive, + list-constructor-expr, range-expr function init() { int:Unsigned32 startIndex = 1; @@ -1917,8 +1906,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a Unsigned32 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed32, int:Unsigned32, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Unsigned32, iterable-inclusive, + list-constructor-expr, range-expr function init() { int:Unsigned32 startIndex = 1; @@ -1936,8 +1925,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a Unsigned32 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned8, int:Unsigned32, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned32, int:Unsigned8, iterable-inclusive, + list-constructor-expr, range-expr function init() { int:Unsigned32 startIndex = 1; @@ -1955,9 +1944,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a Unsigned32 integer and value of the second expression is a byte. -Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned32, byte, additive-expr +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, int:Unsigned32, iterable-inclusive, + list-constructor-expr, range-expr function init() { int:Unsigned32 startIndex = 1; @@ -1975,8 +1963,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a Unsigned32 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned16, int:Unsigned32, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned16, int:Unsigned32, iterable-inclusive, + list-constructor-expr, range-expr function init() { int:Unsigned32 startIndex = 1; @@ -1993,9 +1981,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when values of both expressions are of user-defined subtypes of int. -Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - singleton-type, union-type, module-type-decl, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-inclusive, list-constructor-expr, + module-type-defn, range-expr, singleton-type, union-type type Ints 1|10; @@ -2014,9 +2001,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when values of both expressions are of union of int subtypes. -Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, int:Unsigned32, union-type, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, int:Unsigned32, iterable-inclusive, + list-constructor-expr, range-expr, union-type function init() { int:Signed8|int:Unsigned32 startIndex = 1; @@ -2034,8 +2020,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when the value of the first expression and the value of the second expression is equal. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-inclusive, list-constructor-expr, range-expr function init() { int startIndex = 5; @@ -2054,8 +2039,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when the value of the first expression is less than the value of the second expression. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-inclusive, list-constructor-expr, range-expr function init() { int startIndex = 5; @@ -2073,8 +2057,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when the types of the expressions are inferred. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, int, DecimalNumber, - additive-expr, var +Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-inclusive, list-constructor-expr, + range-expr, var function init() { var startIndex = 1; @@ -2092,8 +2076,8 @@ function init() { Test-Case: output Description: Test field and member access as expressions in range expression (inclusive). -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, field-access-expr, - int, DecimalNumber, mapping-constructor-expr, member-access-expr, module-type-defn, record-type +Labels: array-type, array:push, DecimalNumber, field-access-expr, int, iterable-inclusive, list-constructor-expr, + mapping-constructor-expr, member-access-expr, module-type-defn, range-expr, record-type type Record record { int x; @@ -2115,8 +2099,8 @@ function init() { Test-Case: output Description: Test function and method call as expressions in range expression (inclusive). -Labels: range-expr, iterable-inclusive, DecimalNumber, array-type, list-constructor-expr, array:push, int, - explicit-new-expr, function-call-expr, module-class-defn, method-call-expr +Labels: array-type, array:push, DecimalNumber, explicit-new-expr, function-call-expr, int, iterable-inclusive, + list-constructor-expr, method-call-expr, module-class-defn, range-expr class Class { function getInt() returns int { @@ -2143,8 +2127,8 @@ function getInt() returns int { Test-Case: output Description: Test type cast expression as expressions in range expression (inclusive). -Labels: range-expr, iterable-inclusive, DecimalNumber, array-type, list-constructor-expr, array:push, int, - type-cast-expr, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-inclusive, list-constructor-expr, + range-expr, type-cast-expr function init() { int count = 0; @@ -2160,7 +2144,7 @@ function init() { Test-Case: output Description: Test unary expressions as expressions in range expression (inclusive). -Labels: range-expr, iterable-inclusive, DecimalNumber, array-type, list-constructor-expr, array:push, int, +Labels: array-type, array:push, DecimalNumber, int, iterable-inclusive, list-constructor-expr, range-expr, unary-complement, unary-minus, unary-plus function init() { @@ -2186,8 +2170,7 @@ function init() { Test-Case: output Description: Test additive expression as expressions in range expression (inclusive). -Labels: range-expr, iterable-inclusive, additive-expr, array-type, list-constructor-expr, array:push, - int, DecimalNumber +Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-inclusive, list-constructor-expr, range-expr function init() { int count = 0; @@ -2203,8 +2186,8 @@ function init() { Test-Case: output Description: Test multiplicative expressions as expressions in range expression (inclusive). -Labels: range-expr, iterable-inclusive, DecimalNumber, array-type, list-constructor-expr, array:push, int, - multiplicative-expr, additive-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-inclusive, list-constructor-expr, + multiplicative-expr, range-expr function init() { int count = 0; @@ -2229,8 +2212,8 @@ function init() { Test-Case: output Description: Test binary bitwise expressions as expressions in range expression (inclusive). -Labels: range-expr, iterable-inclusive, binary-bitwise-expr, DecimalNumber, array-type, list-constructor-expr, - array:push, int, additive-expr +Labels: additive-expr, array-type, array:push, binary-bitwise-expr, DecimalNumber, int, iterable-inclusive, + list-constructor-expr, range-expr function init() { int count = 0; @@ -2255,8 +2238,8 @@ function init() { Test-Case: output Description: Test checking expressions as expressions in range expression (inclusive). -Labels: range-expr, iterable-inclusive, check, checkpanic, DecimalNumber, error, array-type, list-constructor-expr, - array:push, int, union-type, optional-type +Labels: array-type, array:push, check, checkpanic, DecimalNumber, error, int, iterable-inclusive, list-constructor-expr, + optional-type, range-expr, union-type function init() returns error? { int|error startIndex = 2; @@ -2274,7 +2257,7 @@ function init() returns error? { Test-Case: output Description: Test let expression as expressions in range expression (inclusive). -Labels: range-expr, iterable-inclusive, DecimalNumber, array-type, list-constructor-expr, array:push, int, let-expr +Labels: array-type, array:push, DecimalNumber, int, iterable-inclusive, let-expr, list-constructor-expr, range-expr function init() { int count = 0; @@ -2290,7 +2273,7 @@ function init() { Test-Case: output Description: Test shift expressions as expressions in range expression (inclusive). -Labels: range-expr, iterable-inclusive, DecimalNumber, array-type, list-constructor-expr, array:push, int, shift-expr +Labels: array-type, array:push, DecimalNumber, int, iterable-inclusive, list-constructor-expr, range-expr, shift-expr function init() { int count = 0; @@ -2306,8 +2289,8 @@ function init() { Test-Case: output Description: Test conditional expressions as expressions in range expression (inclusive). -Labels: range-expr, iterable-inclusive, ternary-conditional-expr, binary-conditional-expr, DecimalNumber, error, - array-type, list-constructor-expr, array:push, int, nil-literal, optional-type, union-type +Labels: array-type, array:push, binary-conditional-expr, DecimalNumber, error, int, iterable-inclusive, + list-constructor-expr, nil-literal, optional-type, range-expr, ternary-conditional-expr, union-type function init() { int|error a = 10; @@ -2325,7 +2308,7 @@ function init() { Test-Case: output Description: Test lang.int constants as expressions in range expression (inclusive). -Labels: range-expr, iterable-inclusive, int, int:SIGNED8_MAX_VALUE, int:UNSIGNED8_MAX_VALUE +Labels: int, int:SIGNED8_MAX_VALUE, int:UNSIGNED8_MAX_VALUE, iterable-inclusive, range-expr function init() { int count = 0; @@ -2338,8 +2321,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when values of both expressions are positive integers. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-object, list-constructor-expr, object-type, + optional-type, range-expr, record-type function init() { int startIndex = 0; @@ -2364,8 +2347,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when values of both expressions are negative integers. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-object, list-constructor-expr, object-type, + optional-type, range-expr, record-type, unary-minus function init() { int startIndex = -6; @@ -2391,8 +2374,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when the value of one expression is a negative integer and the value of the other expression is a positive integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-object, list-constructor-expr, object-type, + optional-type, range-expr, record-type, unary-minus function init() { int startIndex = -10; @@ -2418,8 +2401,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when the value of one expression is a negative integer and the value of the other expression is a positive integer. -Labels: range-expr, iterable-object, int, DecimalNumber, additive-expr, object-type, record-type, - optional-type, unary-minus +Labels: additive-expr, DecimalNumber, int, iterable-object, object-type, optional-type, range-expr, record-type, + unary-minus function init() { int startIndex = -7635315; @@ -2442,8 +2425,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when values of both expressions are positive Signed8 integers. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - additive-expr, int:Signed8, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, iterable-object, list-constructor-expr, + object-type, optional-type, range-expr, record-type function init() { int:Signed8 startIndex = 1; @@ -2469,8 +2452,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when values of both expressions are negative Signed8 integers. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, iterable-object, list-constructor-expr, + object-type, optional-type, range-expr, record-type, unary-minus function init() { int:Signed8 startIndex = -10; @@ -2496,8 +2479,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when the value of one expression is a negative Signed8 integer and the value of the other expression is a positive Signed8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, iterable-object, list-constructor-expr, + object-type, optional-type, range-expr, record-type, unary-minus function init() { int:Signed8 startIndex = -10; @@ -2523,8 +2506,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when values of both expressions are positive Signed16 integers. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, iterable-object, list-constructor-expr, + object-type, optional-type, range-expr, record-type function init() { int:Signed16 startIndex = 1; @@ -2550,8 +2533,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when values of both expressions are negative Signed16 integers. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, iterable-object, list-constructor-expr, + object-type, optional-type, range-expr, record-type, unary-minus function init() { int:Signed16 startIndex = -10; @@ -2577,8 +2560,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when the value of one expression is a negative Signed16 integer and the value of the other expression is a positive Signed16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, iterable-object, list-constructor-expr, + object-type, optional-type, range-expr, record-type, unary-minus function init() { int:Signed16 startIndex = -10; @@ -2604,8 +2587,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when values of both expressions are positive Signed32 integers. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed32, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, iterable-object, list-constructor-expr, + object-type, optional-type, range-expr, record-type function init() { int:Signed32 startIndex = 1; @@ -2631,8 +2614,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when values of both expressions are negative Signed32 integers. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, iterable-object, list-constructor-expr, + object-type, optional-type, range-expr, record-type, unary-minus function init() { int:Signed32 startIndex = -10; @@ -2658,8 +2641,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when the value of one expression is a negative Signed32 integer and the value of the other expression is a positive Signed32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, iterable-object, list-constructor-expr, + object-type, optional-type, range-expr, record-type, unary-minus function init() { int:Signed32 startIndex = -10; @@ -2685,8 +2668,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when values of both expressions are Unsigned8 integers. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned8, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned8, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int:Unsigned8 startIndex = 1; @@ -2712,8 +2695,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when values of both expressions are Unsigned16 integers. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned16, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned16, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus function init() { int:Unsigned16 startIndex = 1; @@ -2739,8 +2722,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when values of both expressions are Unsigned32 integers. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned32, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned32, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus function init() { int:Unsigned32 startIndex = 1; @@ -2766,8 +2749,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, iterable-object, list-constructor-expr, + object-type, optional-type, range-expr, record-type function init() { int startIndex = 1; @@ -2793,8 +2776,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative integer and value of the second expression is a negative Signed8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, iterable-object, list-constructor-expr, + object-type, optional-type, range-expr, record-type, unary-minus function init() { int startIndex = -10; @@ -2820,8 +2803,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, iterable-object, list-constructor-expr, + object-type, optional-type, range-expr, record-type, unary-minus function init() { int startIndex = -10; @@ -2847,8 +2830,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, iterable-object, list-constructor-expr, + object-type, optional-type, range-expr, record-type function init() { int startIndex = 1; @@ -2874,8 +2857,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative integer and value of the second expression is a negative Signed16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, iterable-object, list-constructor-expr, + object-type, optional-type, range-expr, record-type, unary-minus function init() { int startIndex = -10; @@ -2901,8 +2884,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, iterable-object, list-constructor-expr, + object-type, optional-type, range-expr, record-type, unary-minus function init() { int startIndex = -10; @@ -2928,8 +2911,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed32, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, iterable-object, list-constructor-expr, + object-type, optional-type, range-expr, record-type function init() { int startIndex = 1; @@ -2955,8 +2938,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative integer and value of the second expression is a negative Signed32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, iterable-object, list-constructor-expr, + object-type, optional-type, range-expr, record-type, unary-minus function init() { int startIndex = -10; @@ -2982,8 +2965,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, iterable-object, list-constructor-expr, + object-type, optional-type, range-expr, record-type, unary-minus function init() { int startIndex = -10; @@ -3009,8 +2992,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned8, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned8, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int startIndex = 1; @@ -3036,8 +3019,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned8, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned8, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus function init() { int startIndex = -10; @@ -3063,9 +3046,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive integer and value of the second expression is a byte. -Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - byte, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, iterable-object, list-constructor-expr, + object-type, optional-type, range-expr, record-type function init() { int startIndex = 1; @@ -3091,9 +3073,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative integer and value of the second expression is a byte. -Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - byte, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, iterable-object, list-constructor-expr, + object-type, optional-type, range-expr, record-type, unary-minus function init() { int startIndex = -10; @@ -3119,8 +3100,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned16, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned16, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int startIndex = 1; @@ -3146,8 +3127,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned16, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned16, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus function init() { int startIndex = -10; @@ -3173,8 +3154,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned32, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned32, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int startIndex = 1; @@ -3200,8 +3181,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned32, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned32, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus function init() { int startIndex = -10; @@ -3227,8 +3208,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed8 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, iterable-object, list-constructor-expr, + object-type, optional-type, range-expr, record-type function init() { int:Signed8 startIndex = 1; @@ -3254,8 +3235,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a negative integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, iterable-object, list-constructor-expr, + object-type, optional-type, range-expr, record-type, unary-minus function init() { int:Signed8 startIndex = -10; @@ -3281,8 +3262,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, iterable-object, list-constructor-expr, + object-type, optional-type, range-expr, record-type, unary-minus function init() { int:Signed8 startIndex = -10; @@ -3308,8 +3289,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed8 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, int:Signed16, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed8, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int:Signed8 startIndex = 1; @@ -3335,8 +3316,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a negative Signed16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed8, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus function init() { int:Signed8 startIndex = -10; @@ -3362,8 +3343,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed8, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus function init() { int:Signed8 startIndex = -10; @@ -3389,8 +3370,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed8 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, int:Signed32, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Signed8, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int:Signed8 startIndex = 1; @@ -3417,8 +3398,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a negative Signed32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Signed8, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus function init() { int:Signed8 startIndex = -10; @@ -3444,8 +3425,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Signed8, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus function init() { int:Signed8 startIndex = -10; @@ -3471,8 +3452,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed8 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, int:Unsigned8, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, int:Unsigned8, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int:Signed8 startIndex = 1; @@ -3499,8 +3480,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, int:Unsigned8, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, int:Unsigned8, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus function init() { int:Signed8 startIndex = -10; @@ -3526,9 +3507,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed8 integer and value of the second expression is a byte. -Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, byte, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, int:Signed8, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int:Signed8 startIndex = 1; @@ -3554,9 +3534,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a byte. -Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, byte, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, int:Signed8, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus function init() { int:Signed8 startIndex = -10; @@ -3582,8 +3561,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed8 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, int:Unsigned16, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, int:Unsigned16, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int:Signed8 startIndex = 1; @@ -3609,8 +3588,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, int:Unsigned16, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, int:Unsigned16, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus function init() { int:Signed8 startIndex = -10; @@ -3636,8 +3615,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed8 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, int:Unsigned32, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, int:Unsigned32, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int:Signed8 startIndex = 1; @@ -3663,8 +3642,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, int:Unsigned32, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, int:Unsigned32, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus function init() { int:Signed8 startIndex = -10; @@ -3690,8 +3669,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed16 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, iterable-object, list-constructor-expr, + object-type, optional-type, range-expr, record-type function init() { int:Signed16 startIndex = 1; @@ -3717,8 +3696,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a negative integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, iterable-object, list-constructor-expr, + object-type, optional-type, range-expr, record-type, unary-minus function init() { int:Signed16 startIndex = -10; @@ -3744,8 +3723,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, iterable-object, list-constructor-expr, + object-type, optional-type, range-expr, record-type, unary-minus function init() { int:Signed16 startIndex = -10; @@ -3771,8 +3750,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed16 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, int:Signed8, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed8, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int:Signed16 startIndex = 1; @@ -3798,8 +3777,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a negative Signed8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed8, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus function init() { int:Signed16 startIndex = -10; @@ -3825,8 +3804,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed8, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus function init() { int:Signed16 startIndex = -10; @@ -3852,8 +3831,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed16 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, int:Signed32, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed32, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int:Signed16 startIndex = 1; @@ -3879,8 +3858,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a negative Signed32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed32, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus function init() { int:Signed16 startIndex = -10; @@ -3906,8 +3885,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed32, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus function init() { int:Signed16 startIndex = -10; @@ -3933,8 +3912,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed16 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, int:Unsigned8, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Unsigned8, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int:Signed16 startIndex = 1; @@ -3960,8 +3939,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, int:Unsigned8, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Unsigned8, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus function init() { int:Signed16 startIndex = -10; @@ -3987,9 +3966,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed16 integer and value of the second expression is a byte. -Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, byte, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, int:Signed16, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int:Signed16 startIndex = 1; @@ -4015,9 +3993,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a byte. -Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, byte, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, int:Signed16, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus function init() { int:Signed16 startIndex = -10; @@ -4043,8 +4020,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed16 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, int:Unsigned16, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Unsigned16, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int:Signed16 startIndex = 1; @@ -4070,8 +4047,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, int:Unsigned16, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Unsigned16, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus function init() { int:Signed16 startIndex = -10; @@ -4097,8 +4074,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed16 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, int:Unsigned32, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Unsigned32, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int:Signed16 startIndex = 1; @@ -4124,8 +4101,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed16, int:Unsigned32, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Unsigned32, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus function init() { int:Signed16 startIndex = -10; @@ -4151,8 +4128,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed32 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed32, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, iterable-object, list-constructor-expr, + object-type, optional-type, range-expr, record-type function init() { int:Signed32 startIndex = 1; @@ -4178,8 +4155,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a negative integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, iterable-object, list-constructor-expr, + object-type, optional-type, range-expr, record-type, unary-minus function init() { int:Signed32 startIndex = -10; @@ -4205,8 +4182,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed32, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, iterable-object, list-constructor-expr, + object-type, optional-type, range-expr, record-type, unary-minus function init() { int:Signed32 startIndex = -10; @@ -4232,8 +4209,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed32 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed32, int:Signed8, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Signed8, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int:Signed32 startIndex = 1; @@ -4259,8 +4236,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a negative Signed8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed32, int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Signed8, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus function init() { int:Signed32 startIndex = -10; @@ -4286,8 +4263,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed32, int:Signed8, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Signed8, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus function init() { int:Signed32 startIndex = -10; @@ -4313,8 +4290,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed32 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed32, int:Signed16, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed32, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int:Signed32 startIndex = 1; @@ -4340,8 +4317,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a negative Signed16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed32, int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed32, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus function init() { int:Signed32 startIndex = -10; @@ -4367,8 +4344,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed32, int:Signed16, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed32, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus function init() { int:Signed32 startIndex = -10; @@ -4394,8 +4371,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed32 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed32, int:Unsigned8, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Unsigned8, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int:Signed32 startIndex = 1; @@ -4421,8 +4398,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed32, int:Unsigned8, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Unsigned8, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus function init() { int:Signed32 startIndex = -10; @@ -4448,9 +4425,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed32 integer and value of the second expression is a byte. -Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed32, bye, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, int:Signed32, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int:Signed32 startIndex = 1; @@ -4476,9 +4452,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a byte. -Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed32, byte, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, int:Signed32, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus function init() { int:Signed32 startIndex = -10; @@ -4504,8 +4479,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed32 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed32, int:Unsigned16, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Unsigned16, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int:Signed32 startIndex = 1; @@ -4531,8 +4506,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed32, int:Unsigned16, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Unsigned16, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus function init() { int:Signed32 startIndex = -10; @@ -4558,8 +4533,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed32 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed32, int:Unsigned32, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Unsigned32, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int:Signed32 startIndex = 1; @@ -4585,8 +4560,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed32, int:Unsigned32, additive-expr, object-type, record-type, optional-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Unsigned32, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus function init() { int:Signed32 startIndex = -10; @@ -4612,8 +4587,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned8 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned8, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned8, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int:Unsigned8 startIndex = 1; @@ -4639,8 +4614,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned8 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned8, int:Signed8, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, int:Unsigned8, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int:Unsigned8 startIndex = 1; @@ -4667,8 +4642,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned8 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned8, int:Signed16, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Unsigned8, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int:Unsigned8 startIndex = 1; @@ -4694,8 +4669,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned8 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned8, int:Signed32, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Unsigned8, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int:Unsigned8 startIndex = 1; @@ -4721,9 +4696,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned8 integer and value of the second expression is a byte. -Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned8, byte, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, int:Unsigned8, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int:Unsigned8 startIndex = 1; @@ -4749,8 +4723,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned8 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned8, int:Unsigned16, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned16, int:Unsigned8, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int:Unsigned8 startIndex = 1; @@ -4776,8 +4750,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned8 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned8, int:Unsigned32, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned32, int:Unsigned8, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int:Unsigned8 startIndex = 1; @@ -4804,8 +4778,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned16 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned16, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned16, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int:Unsigned16 startIndex = 1; @@ -4831,8 +4805,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned16 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned16, int:Signed8, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, int:Unsigned16, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int:Unsigned16 startIndex = 1; @@ -4858,8 +4832,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned16 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned16, int:Signed16, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Unsigned16, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int:Unsigned16 startIndex = 1; @@ -4885,8 +4859,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned16 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned16, int:Signed32, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Unsigned16, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int:Unsigned16 startIndex = 1; @@ -4912,8 +4886,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned16 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned16, int:Unsigned8, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned16, int:Unsigned8, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int:Unsigned16 startIndex = 1; @@ -4940,9 +4914,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned16 integer and value of the second expression is a byte. -Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned16, byte, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, int:Unsigned16, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int:Unsigned16 startIndex = 1; @@ -4968,8 +4941,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned16 integer and value of the second expression is a Unsigned32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned16, int:Unsigned32, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned16, int:Unsigned32, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int:Unsigned16 startIndex = 1; @@ -4995,8 +4968,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned32 integer and value of the second expression is a positive integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned32, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned32, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int:Unsigned32 startIndex = 1; @@ -5022,8 +4995,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned32 integer and value of the second expression is a positive Signed8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned32, int:Signed8, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, int:Unsigned32, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int:Unsigned32 startIndex = 1; @@ -5049,8 +5022,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned32 integer and value of the second expression is a positive Signed16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned32, int:Signed16, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Unsigned32, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int:Unsigned32 startIndex = 1; @@ -5076,8 +5049,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned32 integer and value of the second expression is a positive Signed32 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned32, int:Signed32, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Unsigned32, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int:Unsigned32 startIndex = 1; @@ -5103,8 +5076,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned32 integer and value of the second expression is a Unsigned8 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned32, int:Unsigned8, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned32, int:Unsigned8, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int:Unsigned32 startIndex = 1; @@ -5130,9 +5103,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned32 integer and value of the second expression is a byte. -Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned32, byte, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, int:Unsigned32, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int:Unsigned32 startIndex = 1; @@ -5158,8 +5130,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned32 integer and value of the second expression is a Unsigned16 integer. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Unsigned32, int:Unsigned16, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned16, int:Unsigned32, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int:Unsigned32 startIndex = 1; @@ -5185,9 +5157,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when values of both expressions are of user-defined subtypes of int. -Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - singleton-type, union-type, module-type-decl, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-object, list-constructor-expr, + module-type-defn, object-type, optional-type, range-expr, record-type, singleton-type, union-type type Ints 1|10; @@ -5215,9 +5186,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when values of both expressions are of union of int subtypes. -Fail-Issue: ballerina-platform/ballerina-lang#33139 -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - int:Signed8, int:Unsigned32, union-type, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, int:Unsigned32, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type, union-type function init() { int:Signed8|int:Unsigned32 startIndex = 1; @@ -5243,8 +5213,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when the value of the first expression and the value of the second expression is equal. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-object, list-constructor-expr, object-type, + optional-type, range-expr, record-type function init() { int startIndex = 5; @@ -5270,8 +5240,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when the value of the first expression is less than the value of the second expression. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-object, list-constructor-expr, object-type, + optional-type, range-expr, record-type function init() { int startIndex = 5; @@ -5297,8 +5267,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when the types of the values of the expressions are inferred. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - additive-expr, object-type, record-type, optional-type, var +Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-object, list-constructor-expr, object-type, + optional-type, range-expr, record-type, var function init() { var startIndex = 1; @@ -5324,8 +5294,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when the types of the values of the expressions and type of the range expression are inferred. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - additive-expr, var +Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-object, list-constructor-expr, range-expr, + var function init() { int startIndex = 1; @@ -5345,8 +5315,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) at module level. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - additive-expr, object-type, record-type, optional-type, var +Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-object, list-constructor-expr, object-type, + optional-type, range-expr, record-type, var int startIndex = 1; int endIndex = 10; @@ -5372,8 +5342,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) at module level. -Labels: range-expr, iterable-object, array-type, list-constructor-expr, array:push, int, DecimalNumber, - additive-expr, var +Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-object, list-constructor-expr, range-expr, + var int startIndex = 1; int endIndex = 10; @@ -5394,8 +5364,8 @@ function init() { Test-Case: output Description: Test iterable object returned by the range expression (inclusive). -Labels: range-expr, array-type, list-constructor-expr, array:push, int, DecimalNumber, object-type, - optional-type, var, value:toBalString, method-call-expr +Labels: array-type, array:push, DecimalNumber, int, list-constructor-expr, method-call-expr, object-type, optional-type, + range-expr, value:toBalString, var function init() { object { @@ -5425,9 +5395,9 @@ function init() { Test-Case: output Description: Test field and member access as expressions in range expression (inclusive). -Labels: range-expr, iterable-object, additive-expr, array-type, list-constructor-expr, array:push, - field-access-expr, DecimalNumber, int, mapping-constructor-expr, member-access-expr, module-type-defn, - object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, field-access-expr, int, iterable-object, + list-constructor-expr, mapping-constructor-expr, member-access-expr, module-type-defn, object-type, + optional-type, range-expr, record-type type Record record { int x; @@ -5456,9 +5426,9 @@ function init() { Test-Case: output Description: Test function and method call as expressions in range expression (inclusive). -Labels: range-expr, iterable-object, DecimalNumber, array-type, list-constructor-expr, array:push, int, - explicit-new-expr, function-call-expr, module-class-defn, method-call-expr, additive-expr, object-type, - record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, explicit-new-expr, function-call-expr, int, + iterable-object, list-constructor-expr, method-call-expr, module-class-defn, object-type, optional-type, + range-expr, record-type class Class { function getInt() returns int { @@ -5492,8 +5462,8 @@ function getInt() returns int { Test-Case: output Description: Test type cast expression as expressions in range expression (inclusive). -Labels: range-expr, iterable-object, DecimalNumber, array-type, list-constructor-expr, array:push, - int, type-cast-expr, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-object, list-constructor-expr, object-type, + optional-type, range-expr, record-type, type-cast-expr function init() { int count = 0; @@ -5516,8 +5486,8 @@ function init() { Test-Case: output Description: Test unary expressions as expressions in range expression (inclusive). -Labels: range-expr, iterable-object, DecimalNumber, array-type, list-constructor-expr, array:push, int, - unary-complement, unary-minus, unary-plus, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-object, list-constructor-expr, object-type, + optional-type, range-expr, record-type, unary-complement, unary-minus, unary-plus function init() { int count = 0; @@ -5551,8 +5521,8 @@ function init() { Test-Case: output Description: Test additive expression as expressions in range expression (inclusive). -Labels: range-expr, iterable-object, additive-expr, array-type, list-constructor-expr, array:push, int, - DecimalNumber, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-object, list-constructor-expr, object-type, + optional-type, range-expr, record-type function init() { int count = 0; @@ -5575,8 +5545,8 @@ function init() { Test-Case: output Description: Test multiplicative expressions as expressions in range expression (inclusive). -Labels: range-expr, iterable-object, additive-expr, DecimalNumber, array-type, list-constructor-expr, array:push, - int, multiplicative-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-object, list-constructor-expr, + multiplicative-expr, object-type, optional-type, range-expr, record-type function init() { int count = 0; @@ -5610,8 +5580,8 @@ function init() { Test-Case: output Description: Test binary bitwise expressions as expressions in range expression (inclusive). -Labels: range-expr, iterable-object, binary-bitwise-expr, DecimalNumber, array-type, list-constructor-expr, - array:push, int, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, binary-bitwise-expr, DecimalNumber, int, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type function init() { int count = 0; @@ -5645,8 +5615,8 @@ function init() { Test-Case: output Description: Test checking expressions as expressions in range expression (inclusive). -Labels: range-expr, iterable-object, check, checkpanic, DecimalNumber, error, array-type, list-constructor-expr, - array:push, int, union-type, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, check, checkpanic, DecimalNumber, error, int, iterable-object, + list-constructor-expr, object-type, optional-type, range-expr, record-type, union-type function init() returns error? { int|error startIndex = 2; @@ -5671,8 +5641,8 @@ function init() returns error? { Test-Case: output Description: Test let expression as expressions in range expression (inclusive). -Labels: range-expr, iterable-object, DecimalNumber, array-type, list-constructor-expr, array:push, - int, let-expr, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-object, let-expr, list-constructor-expr, + object-type, optional-type, range-expr, record-type function init() { int count = 0; @@ -5695,8 +5665,8 @@ function init() { Test-Case: output Description: Test shift expressions as expressions in range expression (inclusive). -Labels: range-expr, iterable-object, DecimalNumber, array-type, list-constructor-expr, array:push, - int, shift-expr, additive-expr, object-type, record-type, optional-type +Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-object, list-constructor-expr, object-type, + optional-type, range-expr, record-type, shift-expr function init() { int count = 0; @@ -5719,8 +5689,8 @@ function init() { Test-Case: output Description: Test conditional expressions as expressions in range expression (inclusive). -Labels: range-expr, iterable-object, conditional-expr, additive-expr, DecimalNumber, error, array-type, - list-constructor-expr, array:push, int, nil-literal, optional-type, union-type, object-type, record-type +Labels: additive-expr, array-type, array:push, conditional-expr, DecimalNumber, error, int, iterable-object, + list-constructor-expr, nil-literal, object-type, optional-type, range-expr, record-type, union-type function init() { int|error a = 10; @@ -5745,8 +5715,8 @@ function init() { Test-Case: output Description: Test lang.int constants as expressions in range expression (inclusive). -Labels: range-expr, iterable-object, int, int:SIGNED8_MAX_VALUE, int:UNSIGNED8_MAX_VALUE, additive-expr, object-type, - record-type, optional-type +Labels: additive-expr, int, int:SIGNED8_MAX_VALUE, int:UNSIGNED8_MAX_VALUE, iterable-object, object-type, optional-type, + range-expr, record-type function init() { int count = 0; @@ -5766,9 +5736,8 @@ function init() { Test-Case: output Description: Test isolatedness of range expression (inclusive). -Fail-Issue: ballerina-platform/ballerina-lang#33163 -Labels: range-expr, iterable-object, object-type, additive-expr, array-type, list-constructor-expr, array:push, - int, DecimalNumber, function-call-expr, record-type, optional-type, lock-stmt +Labels: additive-expr, array-type, array:push, DecimalNumber, function-call-expr, int, iterable-object, + list-constructor-expr, lock-stmt, object-type, optional-type, range-expr, record-type isolated int j = 1; @@ -5796,9 +5765,8 @@ function getRange() returns object { Test-Case: output Description: Test isolatedness of the resultant object of the range expression (inclusive). -Fail-Issue: ballerina-platform/ballerina-lang#33163 -Labels: range-expr, object-type, record-type, array-type, list-constructor-expr, array:push, int, - optional-type, is-expr, any, type-cast-expr +Labels: any, array-type, array:push, int, is-expr, list-constructor-expr, object-type, optional-type, range-expr, + record-type, type-cast-expr function init() { object { @@ -5813,26 +5781,24 @@ function init() { Test-Case: output Description: Test isolatedness of the iterator() and next() methods of range expression (inclusive). -Fail-Issue: ballerina-platform/ballerina-lang#33163 -Labels: range-expr, object-type, array-type, list-constructor-expr, array:push, int, DecimalNumber, - record-type, optional-type, is-expr, method-call-expr +Labels: array-type, array:push, DecimalNumber, int, is-expr, list-constructor-expr, method-call-expr, object-type, + optional-type, range-expr, record-type -function init() { - object { - public isolated function iterator() returns (object { - public isolated function next() returns (record {|int value;|}?); - }); - } range = 1 ... 10; +type IsolatedIterable isolated object { + public isolated function iterator() returns isolated object { + public isolated function next() returns record {| int value; |}?; + }; +}; +function init() { + object {} range = 1 ... 10; - io:println(range.iterator() is isolated function); // @output true - io:println(range.iterator().next() is isolated function); // @output true + io:println(range is IsolatedIterable); // @output true } Test-Case: output Description: Test range expression (inclusive) with query expression. -Labels: range-expr, iterable-inclusive, array-type, list-constructor-expr, array:push, array-type, - list-constructor-expr, array:push, int, DecimalNumber, query-expr +Labels: array-type, array:push, DecimalNumber, int, iterable-inclusive, list-constructor-expr, query-expr, range-expr function init() { int[] a = from int i in 1 ... 10 @@ -5843,7 +5809,7 @@ function init() { Test-Case: error Description: Test range expression (inclusive) when static type of either of the expression is not a subtype of int. -Labels: range-expr, int, DecimalFloatingPointNumber, string +Labels: DecimalFloatingPointNumber, int, range-expr, string function init() { _ = 1.0 ... 10; // @error ... not defined when static type of either of the expression is not a subtype of int @@ -5857,7 +5823,7 @@ function init() { Test-Case: error Description: Test assigning the result of range expression (inclusive) to an incompatible type. -Labels: range-expr, int, DecimalNumber, object-type, record-type, optional-type +Labels: DecimalNumber, int, object-type, optional-type, range-expr, record-type function init() { int _ = 1 ... 10; // @error expects an int, but the result of a range expression is an object @@ -5872,7 +5838,7 @@ function init() { Test-Case: error Description: Test assigning the result of range expression (inclusive) to an incompatible type when the static type of the range expression is inferred. -Labels: range-expr, int, DecimalNumber, object-type, var, record-type, float, optional-type +Labels: DecimalNumber, float, int, object-type, optional-type, range-expr, record-type, var function init() { var a = 1 ... 10; @@ -5888,7 +5854,7 @@ function init() { Test-Case: parser-error Description: Test range expression (inclusive) syntax errors. -Labels: range-expr, DecimalNumber +Labels: DecimalNumber, range-expr function init() { _ = 1..10; // @error invalid operation From 038265a0701057f4e48400684a8714b18ad1eb75 Mon Sep 17 00:00:00 2001 From: lasinicl Date: Fri, 27 May 2022 00:22:22 +0530 Subject: [PATCH 09/14] Fix labels and add tests --- .../range-expr/range_expr_exclusive.balt | 945 +++++++++++------- .../range-expr/range_expr_inclusive.balt | 920 ++++++++++------- 2 files changed, 1093 insertions(+), 772 deletions(-) diff --git a/conformance/lang/expressions/range-expr/range_expr_exclusive.balt b/conformance/lang/expressions/range-expr/range_expr_exclusive.balt index 1d023153..f275aa00 100644 --- a/conformance/lang/expressions/range-expr/range_expr_exclusive.balt +++ b/conformance/lang/expressions/range-expr/range_expr_exclusive.balt @@ -1,6 +1,7 @@ Test-Case: output Description: Test range expression (exclusive) when values of both expressions are positive integers. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-exclusive, list-constructor-expr, range-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, iterable-exclusive, + list-constructor-expr, range-expr function init() { int startIndex = 0; @@ -17,7 +18,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when values of both expressions are negative integers. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-exclusive, list-constructor-expr, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, iterable-exclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -36,7 +37,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when the value of one expression is a negative integer and the value of the other expression is a positive integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-exclusive, list-constructor-expr, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, iterable-exclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -55,7 +56,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when the value of one expression is a negative integer and the value of the other expression is a positive integer. -Labels: additive-expr, DecimalNumber, int, iterable-exclusive, range-expr, unary-minus +Labels: additive-expr, DecimalNumber, foreach-stmt, int, iterable-exclusive, range-expr, unary-minus function init() { int startIndex = -7635315; @@ -69,7 +70,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when values of both expressions are positive Signed8 integers. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed8, iterable-exclusive, list-constructor-expr, range-expr function init() { @@ -87,7 +88,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when values of both expressions are negative Signed8 integers. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed8, iterable-exclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -106,7 +107,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when the value of one expression is a negative Signed8 integer and the value of the other expression is a positive Signed8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed8, iterable-exclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -124,7 +125,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when values of both expressions are positive Signed16 integers. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, iterable-exclusive, list-constructor-expr, range-expr function init() { @@ -142,7 +143,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when values of both expressions are negative Signed16 integers. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, iterable-exclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -161,7 +162,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when the value of one expression is a negative Signed16 integer and the value of the other expression is a positive Signed16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, iterable-exclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -179,7 +180,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when values of both expressions are positive Signed32 integers. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, iterable-exclusive, list-constructor-expr, range-expr function init() { @@ -197,7 +198,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when values of both expressions are negative Signed32 integers. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, iterable-exclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -216,7 +217,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when the value of one expression is a negative Signed32 integer and the value of the other expression is a positive Signed32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, iterable-exclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -234,7 +235,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when values of both expressions are Unsigned8 integers. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned8, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Unsigned8, iterable-exclusive, list-constructor-expr, range-expr function init() { @@ -250,9 +251,27 @@ function init() { io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } +Test-Case: output +Description: Test range expression (exclusive) when values of both expressions are bytes. +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, foreach-stmt, int, iterable-exclusive, + list-constructor-expr, range-expr + +function init() { + byte startIndex = 1; + byte endIndex = 10; + int count = 0; + int[] arr = []; + foreach int i in startIndex ..< endIndex { + arr.push(i); + count = count + 1; + } + io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] +} + Test-Case: output Description: Test range expression (exclusive) when values of both expressions are Unsigned16 integers. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned16, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Unsigned16, iterable-exclusive, list-constructor-expr, range-expr function init() { @@ -270,7 +289,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when values of both expressions are Unsigned32 integers. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned32, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Unsigned32, iterable-exclusive, list-constructor-expr, range-expr function init() { @@ -289,7 +308,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive integer and value of the second expression is a positive Signed8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed8, iterable-exclusive, list-constructor-expr, range-expr function init() { @@ -308,7 +327,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative integer and value of the second expression is a negative Signed8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed8, iterable-exclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -327,7 +346,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative integer and value of the second expression is a positive Signed8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed8, iterable-exclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -346,7 +365,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive integer and value of the second expression is a positive Signed16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, iterable-exclusive, list-constructor-expr, range-expr function init() { @@ -365,7 +384,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative integer and value of the second expression is a negative Signed16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, iterable-exclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -384,7 +403,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative integer and value of the second expression is a positive Signed16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, iterable-exclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -403,7 +422,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive integer and value of the second expression is a positive Signed32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, iterable-exclusive, list-constructor-expr, range-expr function init() { @@ -422,7 +441,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative integer and value of the second expression is a negative Signed32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, iterable-exclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -441,7 +460,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative integer and value of the second expression is a positive Signed32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, iterable-exclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -460,7 +479,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive integer and value of the second expression is a Unsigned8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned8, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Unsigned8, iterable-exclusive, list-constructor-expr, range-expr function init() { @@ -479,7 +498,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative integer and value of the second expression is a Unsigned8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned8, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Unsigned8, iterable-exclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -498,7 +517,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive integer and value of the second expression is a byte. -Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, iterable-exclusive, list-constructor-expr, +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, foreach-stmt, int, iterable-exclusive, list-constructor-expr, range-expr function init() { @@ -517,7 +536,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative integer and value of the second expression is a byte. -Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, iterable-exclusive, list-constructor-expr, +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, foreach-stmt, int, iterable-exclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -536,7 +555,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive integer and value of the second expression is a Unsigned16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned16, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Unsigned16, iterable-exclusive, list-constructor-expr, range-expr function init() { @@ -555,7 +574,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative integer and value of the second expression is a Unsigned16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned16, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Unsigned16, iterable-exclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -574,7 +593,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive integer and value of the second expression is a Unsigned32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned32, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Unsigned32, iterable-exclusive, list-constructor-expr, range-expr function init() { @@ -593,7 +612,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative integer and value of the second expression is a Unsigned32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned32, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Unsigned32, iterable-exclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -612,7 +631,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive Signed8 integer and value of the second expression is a positive integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed8, iterable-exclusive, list-constructor-expr, range-expr function init() { @@ -631,7 +650,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a negative integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed8, iterable-exclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -650,7 +669,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a positive integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed8, iterable-exclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -669,7 +688,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive Signed8 integer and value of the second expression is a positive Signed16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed8, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, int:Signed8, iterable-exclusive, list-constructor-expr, range-expr function init() { @@ -688,7 +707,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a negative Signed16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed8, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, int:Signed8, iterable-exclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -707,7 +726,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a positive Signed16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed8, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, int:Signed8, iterable-exclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -726,7 +745,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive Signed8 integer and value of the second expression is a positive Signed32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Signed8, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, int:Signed8, iterable-exclusive, list-constructor-expr, range-expr function init() { @@ -745,7 +764,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a negative Signed32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Signed8, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, int:Signed8, iterable-exclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -764,7 +783,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a positive Signed32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Signed8, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, int:Signed8, iterable-exclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -783,7 +802,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive Signed8 integer and value of the second expression is a Unsigned8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, int:Unsigned8, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed8, int:Unsigned8, iterable-exclusive, list-constructor-expr, range-expr function init() { @@ -802,7 +821,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a Unsigned8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, int:Unsigned8, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed8, int:Unsigned8, iterable-exclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -821,7 +840,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive Signed8 integer and value of the second expression is a byte. -Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, int:Signed8, iterable-exclusive, +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, foreach-stmt, int, int:Signed8, iterable-exclusive, list-constructor-expr, range-expr function init() { @@ -840,7 +859,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a byte. -Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, int:Signed8, iterable-exclusive, +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, foreach-stmt, int, int:Signed8, iterable-exclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -859,7 +878,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive Signed8 integer and value of the second expression is a Unsigned16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, int:Unsigned16, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed8, int:Unsigned16, iterable-exclusive, list-constructor-expr, range-expr function init() { @@ -878,7 +897,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a Unsigned16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, int:Unsigned16, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed8, int:Unsigned16, iterable-exclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -897,7 +916,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive Signed8 integer and value of the second expression is a Unsigned32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, int:Unsigned32, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed8, int:Unsigned32, iterable-exclusive, list-constructor-expr, range-expr function init() { @@ -916,7 +935,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a Unsigned32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, int:Unsigned32, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed8, int:Unsigned32, iterable-exclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -935,7 +954,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive Signed16 integer and value of the second expression is a positive integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, iterable-exclusive, list-constructor-expr, range-expr function init() { @@ -954,7 +973,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a negative integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, iterable-exclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -973,7 +992,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a positive integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, iterable-exclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -992,7 +1011,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive Signed16 integer and value of the second expression is a positive Signed8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed8, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, int:Signed8, iterable-exclusive, list-constructor-expr, range-expr function init() { @@ -1011,7 +1030,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a negative Signed8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed8, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, int:Signed8, iterable-exclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -1030,7 +1049,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a positive Signed8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed8, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, int:Signed8, iterable-exclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -1049,7 +1068,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive Signed16 integer and value of the second expression is a positive Signed32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed32, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, int:Signed32, iterable-exclusive, list-constructor-expr, range-expr function init() { @@ -1068,7 +1087,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a negative Signed32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed32, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, int:Signed32, iterable-exclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -1087,7 +1106,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a positive Signed32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed32, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, int:Signed32, iterable-exclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -1106,7 +1125,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive Signed16 integer and value of the second expression is a Unsigned8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Unsigned8, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, int:Unsigned8, iterable-exclusive, list-constructor-expr, range-expr function init() { @@ -1125,7 +1144,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a Unsigned8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Unsigned8, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, int:Unsigned8, iterable-exclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -1144,7 +1163,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive Signed16 integer and value of the second expression is a byte. -Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, int:Signed16, iterable-exclusive, +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, foreach-stmt, int, int:Signed16, iterable-exclusive, list-constructor-expr, range-expr function init() { @@ -1163,7 +1182,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a byte. -Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, int:Signed16, iterable-exclusive, +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, foreach-stmt, int, int:Signed16, iterable-exclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -1182,7 +1201,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive Signed16 integer and value of the second expression is a Unsigned16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Unsigned16, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, int:Unsigned16, iterable-exclusive, list-constructor-expr, range-expr function init() { @@ -1201,7 +1220,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a Unsigned16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Unsigned16, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, int:Unsigned16, iterable-exclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -1220,7 +1239,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive Signed16 integer and value of the second expression is a Unsigned32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Unsigned32, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, int:Unsigned32, iterable-exclusive, list-constructor-expr, range-expr function init() { @@ -1239,7 +1258,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a Unsigned32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Unsigned32, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, int:Unsigned32, iterable-exclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -1258,7 +1277,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive Signed32 integer and value of the second expression is a positive integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, iterable-exclusive, list-constructor-expr, range-expr function init() { @@ -1277,7 +1296,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a negative integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, iterable-exclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -1296,7 +1315,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a positive integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, iterable-exclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -1315,7 +1334,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive Signed32 integer and value of the second expression is a positive Signed8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Signed8, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, int:Signed8, iterable-exclusive, list-constructor-expr, range-expr function init() { @@ -1334,7 +1353,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a negative Signed8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Signed8, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, int:Signed8, iterable-exclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -1353,7 +1372,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a positive Signed8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Signed8, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, int:Signed8, iterable-exclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -1372,7 +1391,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive Signed32 integer and value of the second expression is a positive Signed16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed32, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, int:Signed32, iterable-exclusive, list-constructor-expr, range-expr function init() { @@ -1391,7 +1410,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a negative Signed16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed32, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, int:Signed32, iterable-exclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -1410,7 +1429,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a positive Signed16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed32, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, int:Signed32, iterable-exclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -1429,7 +1448,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive Signed32 integer and value of the second expression is a Unsigned8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Unsigned8, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, int:Unsigned8, iterable-exclusive, list-constructor-expr, range-expr function init() { @@ -1448,7 +1467,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a Unsigned8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Unsigned8, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, int:Unsigned8, iterable-exclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -1467,7 +1486,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive Signed32 integer and value of the second expression is a byte. -Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, int:Signed32, iterable-exclusive, +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, foreach-stmt, int, int:Signed32, iterable-exclusive, list-constructor-expr, range-expr function init() { @@ -1486,7 +1505,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a byte. -Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, int:Signed32, iterable-exclusive, +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, foreach-stmt, int, int:Signed32, iterable-exclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -1505,7 +1524,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive Signed32 integer and value of the second expression is a Unsigned16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Unsigned16, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, int:Unsigned16, iterable-exclusive, list-constructor-expr, range-expr function init() { @@ -1524,7 +1543,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a Unsigned16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Unsigned16, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, int:Unsigned16, iterable-exclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -1543,7 +1562,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a positive Signed32 integer and value of the second expression is a Unsigned32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Unsigned32, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, int:Unsigned32, iterable-exclusive, list-constructor-expr, range-expr function init() { @@ -1562,7 +1581,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a Unsigned32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Unsigned32, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, int:Unsigned32, iterable-exclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -1581,7 +1600,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a Unsigned8 integer and value of the second expression is a positive integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned8, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Unsigned8, iterable-exclusive, list-constructor-expr, range-expr function init() { @@ -1600,7 +1619,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a Unsigned8 integer and value of the second expression is a positive Signed8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, int:Unsigned8, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed8, int:Unsigned8, iterable-exclusive, list-constructor-expr, range-expr function init() { @@ -1619,7 +1638,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a Unsigned8 integer and value of the second expression is a positive Signed16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Unsigned8, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, int:Unsigned8, iterable-exclusive, list-constructor-expr, range-expr function init() { @@ -1638,7 +1657,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a Unsigned8 integer and value of the second expression is a positive Signed32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Unsigned8, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, int:Unsigned8, iterable-exclusive, list-constructor-expr, range-expr function init() { @@ -1657,7 +1676,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a Unsigned8 integer and value of the second expression is a byte. -Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, int:Unsigned8, iterable-exclusive, +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, foreach-stmt, int, int:Unsigned8, iterable-exclusive, list-constructor-expr, range-expr function init() { @@ -1676,7 +1695,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a Unsigned8 integer and value of the second expression is a Unsigned16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned16, int:Unsigned8, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Unsigned16, int:Unsigned8, iterable-exclusive, list-constructor-expr, range-expr function init() { @@ -1695,7 +1714,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a Unsigned8 integer and value of the second expression is a Unsigned32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned32, int:Unsigned8, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Unsigned32, int:Unsigned8, iterable-exclusive, list-constructor-expr, range-expr function init() { @@ -1714,7 +1733,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a Unsigned16 integer and value of the second expression is a positive integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned16, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Unsigned16, iterable-exclusive, list-constructor-expr, range-expr function init() { @@ -1733,7 +1752,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a Unsigned16 integer and value of the second expression is a positive Signed8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, int:Unsigned16, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed8, int:Unsigned16, iterable-exclusive, list-constructor-expr, range-expr function init() { @@ -1752,7 +1771,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a Unsigned16 integer and value of the second expression is a positive Signed16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Unsigned16, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, int:Unsigned16, iterable-exclusive, list-constructor-expr, range-expr function init() { @@ -1771,7 +1790,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a Unsigned16 integer and value of the second expression is a positive Signed32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Unsigned16, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, int:Unsigned16, iterable-exclusive, list-constructor-expr, range-expr function init() { @@ -1790,7 +1809,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a Unsigned16 integer and value of the second expression is a Unsigned8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned16, int:Unsigned8, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Unsigned16, int:Unsigned8, iterable-exclusive, list-constructor-expr, range-expr function init() { @@ -1809,7 +1828,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a Unsigned16 integer and value of the second expression is a byte. -Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, int:Unsigned16, iterable-exclusive, +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, foreach-stmt, int, int:Unsigned16, iterable-exclusive, list-constructor-expr, range-expr function init() { @@ -1828,7 +1847,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a Unsigned16 integer and value of the second expression is a Unsigned32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned16, int:Unsigned32, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Unsigned16, int:Unsigned32, iterable-exclusive, list-constructor-expr, range-expr function init() { @@ -1847,7 +1866,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a Unsigned32 integer and value of the second expression is a positive integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned32, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Unsigned32, iterable-exclusive, list-constructor-expr, range-expr function init() { @@ -1866,7 +1885,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a Unsigned32 integer and value of the second expression is a positive Signed8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, int:Unsigned32, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed8, int:Unsigned32, iterable-exclusive, list-constructor-expr, range-expr function init() { @@ -1885,7 +1904,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a Unsigned32 integer and value of the second expression is a positive Signed16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Unsigned32, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, int:Unsigned32, iterable-exclusive, list-constructor-expr, range-expr function init() { @@ -1904,7 +1923,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a Unsigned32 integer and value of the second expression is a positive Signed32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Unsigned32, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, int:Unsigned32, iterable-exclusive, list-constructor-expr, range-expr function init() { @@ -1923,7 +1942,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a Unsigned32 integer and value of the second expression is a Unsigned8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned32, int:Unsigned8, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Unsigned32, int:Unsigned8, iterable-exclusive, list-constructor-expr, range-expr function init() { @@ -1942,7 +1961,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a Unsigned32 integer and value of the second expression is a byte. -Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, int:Unsigned32, iterable-exclusive, +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, foreach-stmt, int, int:Unsigned32, iterable-exclusive, list-constructor-expr, range-expr function init() { @@ -1961,7 +1980,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when value of the first expression is a Unsigned32 integer and value of the second expression is a Unsigned16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned16, int:Unsigned32, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Unsigned16, int:Unsigned32, iterable-exclusive, list-constructor-expr, range-expr function init() { @@ -1979,7 +1998,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when values of both expressions are of user-defined subtypes of int. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-exclusive, list-constructor-expr, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, iterable-exclusive, list-constructor-expr, module-type-defn, range-expr, singleton-type, union-type type Ints 1|10; @@ -1997,9 +2016,29 @@ function init() { io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } +Test-Case: output +Description: Test range expression (exclusive) when values of both expressions are of singleton types of int. +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, iterable-exclusive, list-constructor-expr, + module-type-defn, range-expr, singleton-type + +type TEN 10; + +function init() { + 1 startIndex = 1; + TEN endIndex = 10; + int count = 0; + int[] arr = []; + foreach int i in startIndex ..< endIndex { + arr.push(i); + count = count + 1; + } + io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] +} + Test-Case: output Description: Test range expression (exclusive) when values of both expressions are of union of int subtypes. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, int:Unsigned32, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed8, int:Unsigned32, iterable-exclusive, list-constructor-expr, range-expr, union-type function init() { @@ -2018,7 +2057,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when the value of the first expression and the value of the second expression is equal. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-exclusive, list-constructor-expr, range-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, iterable-exclusive, list-constructor-expr, range-expr function init() { int startIndex = 5; @@ -2037,7 +2076,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when the value of the first expression is less than the value of the second expression. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-exclusive, list-constructor-expr, range-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, iterable-exclusive, list-constructor-expr, range-expr function init() { int startIndex = 5; @@ -2055,7 +2094,7 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when the types expressions are inferred. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-exclusive, list-constructor-expr, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, iterable-exclusive, list-constructor-expr, range-expr, var function init() { @@ -2072,9 +2111,26 @@ function init() { io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } +Test-Case: output +Description: Test int literals as expressions in range expression (exclusive). +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, iterable-exclusive, list-constructor-expr, + range-expr + +function init() { + int count = 0; + int[] arr = []; + + foreach int i in 1 ..< 10 { + arr.push(i); + count = count + 1; + } + io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] +} + Test-Case: output Description: Test field and member access as expressions in range expression (exclusive). -Labels: additive-expr, array-type, array:push, DecimalNumber, field-access-expr, int, iterable-exclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, field-access-expr, foreach-stmt, int, iterable-exclusive, list-constructor-expr, mapping-constructor-expr, member-access-expr, module-type-defn, range-expr, record-type type Record record { @@ -2097,7 +2153,7 @@ function init() { Test-Case: output Description: Test function and method call as expressions in range expression (exclusive). -Labels: additive-expr, array-type, array:push, DecimalNumber, explicit-new-expr, function-call-expr, int, +Labels: additive-expr, array-type, array:push, DecimalNumber, explicit-new-expr, foreach-stmt, function-call-expr, int, iterable-exclusive, list-constructor-expr, method-call-expr, module-class-defn, range-expr class Class { @@ -2125,7 +2181,7 @@ function getInt() returns int { Test-Case: output Description: Test type cast expression as expressions in range expression (exclusive). -Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-exclusive, list-constructor-expr, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, iterable-exclusive, list-constructor-expr, range-expr, type-cast-expr function init() { @@ -2142,7 +2198,7 @@ function init() { Test-Case: output Description: Test unary expressions as expressions in range expression (exclusive). -Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-exclusive, list-constructor-expr, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, iterable-exclusive, list-constructor-expr, range-expr, unary-complement, unary-minus, unary-plus function init() { @@ -2168,7 +2224,7 @@ function init() { Test-Case: output Description: Test additive expression as expressions in range expression (exclusive). -Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-exclusive, list-constructor-expr, range-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, iterable-exclusive, list-constructor-expr, range-expr function init() { int count = 0; @@ -2184,7 +2240,7 @@ function init() { Test-Case: output Description: Test multiplicative expressions as expressions in range expression (exclusive). -Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-exclusive, list-constructor-expr, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, iterable-exclusive, list-constructor-expr, multiplicative-expr, range-expr function init() { @@ -2210,7 +2266,7 @@ function init() { Test-Case: output Description: Test binary bitwise expressions as expressions in range expression (exclusive). -Labels: additive-expr, array-type, array:push, binary-bitwise-expr, DecimalNumber, int, iterable-exclusive, +Labels: additive-expr, array-type, array:push, binary-bitwise-expr, DecimalNumber, foreach-stmt, int, iterable-exclusive, list-constructor-expr, range-expr function init() { @@ -2236,7 +2292,7 @@ function init() { Test-Case: output Description: Test checking expressions as expressions in range expression (exclusive). -Labels: additive-expr, array-type, array:push, check, checkpanic, DecimalNumber, error, int, iterable-exclusive, +Labels: additive-expr, array-type, array:push, check, checkpanic, DecimalNumber, error, foreach-stmt, int, iterable-exclusive, list-constructor-expr, optional-type, range-expr, union-type function init() returns error? { @@ -2255,7 +2311,7 @@ function init() returns error? { Test-Case: output Description: Test let expression as expressions in range expression (exclusive). -Labels: DecimalNumber, int, iterable-exclusive, let-expr, range-expr +Labels: DecimalNumber, foreach-stmt, int, iterable-exclusive, let-expr, range-expr function init() { int count = 0; @@ -2271,7 +2327,7 @@ function init() { Test-Case: output Description: Test shift expressions as expressions in range expression (exclusive). -Labels: DecimalNumber, int, iterable-exclusive, range-expr, shift-expr +Labels: DecimalNumber, foreach-stmt, int, iterable-exclusive, range-expr, shift-expr function init() { int count = 0; @@ -2287,7 +2343,7 @@ function init() { Test-Case: output Description: Test conditional expressions as expressions in range expression (exclusive). -Labels: additive-expr, array-type, array:push, binary-conditional-expr, DecimalNumber, error, int, iterable-exclusive, +Labels: additive-expr, array-type, array:push, binary-conditional-expr, DecimalNumber, error, foreach-stmt, int, iterable-exclusive, list-constructor-expr, nil-literal, optional-type, range-expr, ternary-conditional-expr, union-type function init() { @@ -2306,7 +2362,7 @@ function init() { Test-Case: output Description: Test lang.int constants as expressions in range expression (exclusive). -Labels: additive-expr, int, int:SIGNED8_MAX_VALUE, int:UNSIGNED8_MAX_VALUE, iterable-exclusive, range-expr +Labels: additive-expr, foreach-stmt, int, int:SIGNED8_MAX_VALUE, int:UNSIGNED8_MAX_VALUE, iterable-exclusive, range-expr function init() { int count = 0; @@ -2320,8 +2376,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when values of both expressions are positive integers. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-object, list-constructor-expr, object-type, - optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int startIndex = 0; @@ -2347,8 +2403,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when values of both expressions are negative integers. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-object, list-constructor-expr, object-type, - optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type, unary-minus function init() { int startIndex = -6; @@ -2374,8 +2430,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when the value of one expression is a negative integer and the value of the other expression is a positive integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-object, list-constructor-expr, object-type, - optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type, unary-minus function init() { int startIndex = -10; @@ -2401,8 +2457,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when the value of one expression is a negative integer and the value of the other expression is a positive integer. -Labels: additive-expr, DecimalNumber, int, iterable-object, object-type, optional-type, range-expr, record-type, - unary-minus +Labels: additive-expr, DecimalNumber, foreach-stmt, int, isolated-method, iterable-object, object-type, object-type-inclusion, + optional-type, range-expr, record-type, unary-minus function init() { int startIndex = -7635315; @@ -2425,8 +2481,9 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when values of both expressions are positive Signed8 integers. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, iterable-object, list-constructor-expr, - object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed8, isolated-method, + iterable-object, list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, + record-type function init() { int:Signed8 startIndex = 1; @@ -2452,8 +2509,9 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when values of both expressions are negative Signed8 integers. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, iterable-object, list-constructor-expr, - object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed8, isolated-method, + iterable-object, list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, + record-type, unary-minus function init() { int:Signed8 startIndex = -10; @@ -2479,8 +2537,9 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when the value of one expression is a negative Signed8 integer and the value of the other expression is a positive Signed8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, iterable-object, list-constructor-expr, - object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed8, isolated-method, + iterable-object, list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, + record-type, unary-minus function init() { int:Signed8 startIndex = -10; @@ -2506,8 +2565,9 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when values of both expressions are positive Signed16 integers. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, iterable-object, list-constructor-expr, - object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, isolated-method, + iterable-object, list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, + record-type function init() { int:Signed16 startIndex = 1; @@ -2533,8 +2593,9 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when values of both expressions are negative Signed16 integers. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, iterable-object, list-constructor-expr, - object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, isolated-method, + iterable-object, list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, + record-type, unary-minus function init() { int:Signed16 startIndex = -10; @@ -2560,8 +2621,9 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when the value of one expression is a negative Signed16 integer and the value of the other expression is a positive Signed16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, iterable-object, list-constructor-expr, - object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, isolated-method, + iterable-object, list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, + record-type, unary-minus function init() { int:Signed16 startIndex = -10; @@ -2587,8 +2649,9 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when values of both expressions are positive Signed32 integers. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, iterable-object, list-constructor-expr, - object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, isolated-method, + iterable-object, list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, + record-type function init() { int:Signed32 startIndex = 1; @@ -2614,8 +2677,9 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when values of both expressions are negative Signed32 integers. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, iterable-object, list-constructor-expr, - object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, isolated-method, + iterable-object, list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, + record-type, unary-minus function init() { int:Signed32 startIndex = -10; @@ -2641,8 +2705,9 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when the value of one expression is a negative Signed32 integer and the value of the other expression is a positive Signed32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, iterable-object, list-constructor-expr, - object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, isolated-method, + iterable-object, list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, + record-type, unary-minus function init() { int:Signed32 startIndex = -10; @@ -2668,8 +2733,9 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when values of both expressions are Unsigned8 integers. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned8, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Unsigned8, isolated-method, + iterable-object, list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, + record-type function init() { int:Unsigned8 startIndex = 1; @@ -2692,11 +2758,38 @@ function init() { io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } +Test-Case: output +Description: Test range expression (exclusive) with iterable object when values of both expressions are bytes. +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, foreach-stmt, int, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, + record-type + +function init() { + byte startIndex = 1; + byte endIndex = 10; + int count = 0; + int[] arr = []; + + object { + *object:Iterable; + public isolated function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + arr.push(i); + count = count + 1; + } + io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] +} + Test-Case: output Description: Test range expression (exclusive) with iterable object when values of both expressions are Unsigned16 integers. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned16, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Unsigned16, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type, unary-minus function init() { int:Unsigned16 startIndex = 1; @@ -2722,8 +2815,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when values of both expressions are Unsigned32 integers. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned32, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Unsigned32, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type, unary-minus function init() { int:Unsigned32 startIndex = 1; @@ -2749,8 +2842,9 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive integer and value of the second expression is a positive Signed8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, iterable-object, list-constructor-expr, - object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed8, isolated-method, + iterable-object, list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, + record-type function init() { int startIndex = 1; @@ -2776,8 +2870,9 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative integer and value of the second expression is a negative Signed8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, iterable-object, list-constructor-expr, - object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed8, isolated-method, + iterable-object, list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, + record-type, unary-minus function init() { int startIndex = -10; @@ -2803,8 +2898,9 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative integer and value of the second expression is a positive Signed8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, iterable-object, list-constructor-expr, - object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed8, isolated-method, + iterable-object, list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, + record-type, unary-minus function init() { int startIndex = -10; @@ -2830,8 +2926,9 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive integer and value of the second expression is a positive Signed16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, iterable-object, list-constructor-expr, - object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, isolated-method, + iterable-object, list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, + record-type function init() { int startIndex = 1; @@ -2857,8 +2954,9 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative integer and value of the second expression is a negative Signed16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, iterable-object, list-constructor-expr, - object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, isolated-method, + iterable-object, list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, + record-type, unary-minus function init() { int startIndex = -10; @@ -2884,8 +2982,9 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative integer and value of the second expression is a positive Signed16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, iterable-object, list-constructor-expr, - object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, isolated-method, + iterable-object, list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, + record-type, unary-minus function init() { int startIndex = -10; @@ -2911,8 +3010,9 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive integer and value of the second expression is a positive Signed32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, iterable-object, list-constructor-expr, - object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, isolated-method, + iterable-object, list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, + record-type function init() { int startIndex = 1; @@ -2938,8 +3038,9 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative integer and value of the second expression is a negative Signed32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, iterable-object, list-constructor-expr, - object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, isolated-method, + iterable-object, list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, + record-type, unary-minus function init() { int startIndex = -10; @@ -2965,8 +3066,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative integer and value of the second expression is a positive Signed32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, iterable-object, list-constructor-expr, - object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type, unary-minus function init() { int startIndex = -10; @@ -2992,8 +3093,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive integer and value of the second expression is a Unsigned8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned8, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Unsigned8, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int startIndex = 1; @@ -3019,8 +3120,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative integer and value of the second expression is a Unsigned8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned8, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Unsigned8, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type, unary-minus function init() { int startIndex = -10; @@ -3046,8 +3147,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive integer and value of the second expression is a byte. -Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, iterable-object, list-constructor-expr, - object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, foreach-stmt, int, isolated-method, iterable-object, list-constructor-expr, + object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int startIndex = 1; @@ -3073,8 +3174,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative integer and value of the second expression is a byte. -Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, iterable-object, list-constructor-expr, - object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, foreach-stmt, int, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type, unary-minus function init() { int startIndex = -10; @@ -3100,8 +3201,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive integer and value of the second expression is a Unsigned16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned16, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Unsigned16, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int startIndex = 1; @@ -3127,8 +3228,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative integer and value of the second expression is a Unsigned16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned16, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Unsigned16, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type, unary-minus function init() { int startIndex = -10; @@ -3154,8 +3255,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive integer and value of the second expression is a Unsigned32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned32, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Unsigned32, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int startIndex = 1; @@ -3181,8 +3282,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative integer and value of the second expression is a Unsigned32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned32, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Unsigned32, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type, unary-minus function init() { int startIndex = -10; @@ -3208,8 +3309,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed8 integer and value of the second expression is a positive integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, iterable-object, list-constructor-expr, - object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed8, isolated-method, iterable-object, list-constructor-expr, + object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int:Signed8 startIndex = 1; @@ -3235,8 +3336,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a negative integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, iterable-object, list-constructor-expr, - object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed8, isolated-method, iterable-object, list-constructor-expr, + object-type, object-type-inclusion, optional-type, range-expr, record-type, unary-minus function init() { int:Signed8 startIndex = -10; @@ -3262,8 +3363,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a positive integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, iterable-object, list-constructor-expr, - object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed8, isolated-method, iterable-object, list-constructor-expr, + object-type, object-type-inclusion, optional-type, range-expr, record-type, unary-minus function init() { int:Signed8 startIndex = -10; @@ -3289,8 +3390,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed8 integer and value of the second expression is a positive Signed16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed8, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, int:Signed8, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int:Signed8 startIndex = 1; @@ -3316,8 +3417,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a negative Signed16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed8, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, int:Signed8, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type, unary-minus function init() { int:Signed8 startIndex = -10; @@ -3343,8 +3444,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a positive Signed16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed8, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, int:Signed8, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type, unary-minus function init() { int:Signed8 startIndex = -10; @@ -3370,8 +3471,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed8 integer and value of the second expression is a positive Signed32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Signed8, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, int:Signed8, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int:Signed8 startIndex = 1; @@ -3398,8 +3499,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a negative Signed32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Signed8, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, int:Signed8, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type, unary-minus function init() { int:Signed8 startIndex = -10; @@ -3425,8 +3526,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a positive Signed32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Signed8, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, int:Signed8, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type, unary-minus function init() { int:Signed8 startIndex = -10; @@ -3452,8 +3553,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed8 integer and value of the second expression is a Unsigned8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, int:Unsigned8, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed8, int:Unsigned8, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int:Signed8 startIndex = 1; @@ -3480,8 +3581,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a Unsigned8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, int:Unsigned8, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed8, int:Unsigned8, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type, unary-minus function init() { int:Signed8 startIndex = -10; @@ -3507,8 +3608,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed8 integer and value of the second expression is a byte. -Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, int:Signed8, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, foreach-stmt, int, int:Signed8, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int:Signed8 startIndex = 1; @@ -3534,8 +3635,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a byte. -Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, int:Signed8, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, foreach-stmt, int, int:Signed8, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type, unary-minus function init() { int:Signed8 startIndex = -10; @@ -3561,8 +3662,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed8 integer and value of the second expression is a Unsigned16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, int:Unsigned16, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed8, int:Unsigned16, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int:Signed8 startIndex = 1; @@ -3588,8 +3689,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a Unsigned16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, int:Unsigned16, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed8, int:Unsigned16, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type, unary-minus function init() { int:Signed8 startIndex = -10; @@ -3615,8 +3716,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed8 integer and value of the second expression is a Unsigned32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, int:Unsigned32, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed8, int:Unsigned32, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int:Signed8 startIndex = 1; @@ -3642,8 +3743,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a Unsigned32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, int:Unsigned32, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed8, int:Unsigned32, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type, unary-minus function init() { int:Signed8 startIndex = -10; @@ -3669,8 +3770,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed16 integer and value of the second expression is a positive integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, iterable-object, list-constructor-expr, - object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, isolated-method, iterable-object, list-constructor-expr, + object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int:Signed16 startIndex = 1; @@ -3696,8 +3797,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a negative integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, iterable-object, list-constructor-expr, - object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, isolated-method, iterable-object, list-constructor-expr, + object-type, object-type-inclusion, optional-type, range-expr, record-type, unary-minus function init() { int:Signed16 startIndex = -10; @@ -3723,8 +3824,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a positive integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, iterable-object, list-constructor-expr, - object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, isolated-method, iterable-object, list-constructor-expr, + object-type, object-type-inclusion, optional-type, range-expr, record-type, unary-minus function init() { int:Signed16 startIndex = -10; @@ -3750,8 +3851,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed16 integer and value of the second expression is a positive Signed8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed8, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, int:Signed8, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int:Signed16 startIndex = 1; @@ -3777,8 +3878,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a negative Signed8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed8, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, int:Signed8, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type, unary-minus function init() { int:Signed16 startIndex = -10; @@ -3804,8 +3905,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a positive Signed8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed8, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, int:Signed8, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type, unary-minus function init() { int:Signed16 startIndex = -10; @@ -3831,8 +3932,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed16 integer and value of the second expression is a positive Signed32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed32, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, int:Signed32, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int:Signed16 startIndex = 1; @@ -3858,8 +3959,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a negative Signed32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed32, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, int:Signed32, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type, unary-minus function init() { int:Signed16 startIndex = -10; @@ -3885,8 +3986,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a positive Signed32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed32, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, int:Signed32, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type, unary-minus function init() { int:Signed16 startIndex = -10; @@ -3912,8 +4013,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed16 integer and value of the second expression is a Unsigned8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Unsigned8, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, int:Unsigned8, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int:Signed16 startIndex = 1; @@ -3939,8 +4040,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a Unsigned8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Unsigned8, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, int:Unsigned8, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type, unary-minus function init() { int:Signed16 startIndex = -10; @@ -3966,8 +4067,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed16 integer and value of the second expression is a byte. -Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, int:Signed16, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, foreach-stmt, int, int:Signed16, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int:Signed16 startIndex = 1; @@ -3993,8 +4094,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a byte. -Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, int:Signed16, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, foreach-stmt, int, int:Signed16, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type, unary-minus function init() { int:Signed16 startIndex = -10; @@ -4020,8 +4121,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed16 integer and value of the second expression is a Unsigned16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Unsigned16, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, int:Unsigned16, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int:Signed16 startIndex = 1; @@ -4047,8 +4148,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a Unsigned16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Unsigned16, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, int:Unsigned16, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type, unary-minus function init() { int:Signed16 startIndex = -10; @@ -4074,8 +4175,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed16 integer and value of the second expression is a Unsigned32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Unsigned32, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, int:Unsigned32, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int:Signed16 startIndex = 1; @@ -4101,8 +4202,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a Unsigned32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Unsigned32, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, int:Unsigned32, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type, unary-minus function init() { int:Signed16 startIndex = -10; @@ -4128,8 +4229,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed32 integer and value of the second expression is a positive integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, iterable-object, list-constructor-expr, - object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, isolated-method, iterable-object, list-constructor-expr, + object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int:Signed32 startIndex = 1; @@ -4155,8 +4256,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a negative integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, iterable-object, list-constructor-expr, - object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, isolated-method, iterable-object, list-constructor-expr, + object-type, object-type-inclusion, optional-type, range-expr, record-type, unary-minus function init() { int:Signed32 startIndex = -10; @@ -4182,8 +4283,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a positive integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, iterable-object, list-constructor-expr, - object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, isolated-method, iterable-object, list-constructor-expr, + object-type, object-type-inclusion, optional-type, range-expr, record-type, unary-minus function init() { int:Signed32 startIndex = -10; @@ -4209,8 +4310,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed32 integer and value of the second expression is a positive Signed8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Signed8, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, int:Signed8, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int:Signed32 startIndex = 1; @@ -4236,8 +4337,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a negative Signed8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Signed8, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, int:Signed8, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type, unary-minus function init() { int:Signed32 startIndex = -10; @@ -4263,8 +4364,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a positive Signed8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Signed8, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, int:Signed8, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type, unary-minus function init() { int:Signed32 startIndex = -10; @@ -4290,8 +4391,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed32 integer and value of the second expression is a positive Signed16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed32, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, int:Signed32, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int:Signed32 startIndex = 1; @@ -4317,8 +4418,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a negative Signed16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed32, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, int:Signed32, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type, unary-minus function init() { int:Signed32 startIndex = -10; @@ -4344,8 +4445,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a positive Signed16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed32, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, int:Signed32, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type, unary-minus function init() { int:Signed32 startIndex = -10; @@ -4371,8 +4472,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed32 integer and value of the second expression is a Unsigned8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Unsigned8, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, int:Unsigned8, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int:Signed32 startIndex = 1; @@ -4398,8 +4499,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a Unsigned8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Unsigned8, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, int:Unsigned8, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type, unary-minus function init() { int:Signed32 startIndex = -10; @@ -4425,8 +4526,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed32 integer and value of the second expression is a byte. -Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, int:Signed32, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, foreach-stmt, int, int:Signed32, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int:Signed32 startIndex = 1; @@ -4452,8 +4553,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a byte. -Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, int:Signed32, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, foreach-stmt, int, int:Signed32, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type, unary-minus function init() { int:Signed32 startIndex = -10; @@ -4479,8 +4580,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed32 integer and value of the second expression is a Unsigned16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Unsigned16, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, int:Unsigned16, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int:Signed32 startIndex = 1; @@ -4506,8 +4607,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a Unsigned16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Unsigned16, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, int:Unsigned16, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type, unary-minus function init() { int:Signed32 startIndex = -10; @@ -4533,8 +4634,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a positive Signed32 integer and value of the second expression is a Unsigned32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Unsigned32, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, int:Unsigned32, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int:Signed32 startIndex = 1; @@ -4560,8 +4661,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a Unsigned32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Unsigned32, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, int:Unsigned32, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type, unary-minus function init() { int:Signed32 startIndex = -10; @@ -4587,8 +4688,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned8 integer and value of the second expression is a positive integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned8, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Unsigned8, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int:Unsigned8 startIndex = 1; @@ -4614,8 +4715,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned8 integer and value of the second expression is a positive Signed8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, int:Unsigned8, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed8, int:Unsigned8, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int:Unsigned8 startIndex = 1; @@ -4642,8 +4743,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned8 integer and value of the second expression is a positive Signed16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Unsigned8, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, int:Unsigned8, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int:Unsigned8 startIndex = 1; @@ -4669,8 +4770,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned8 integer and value of the second expression is a positive Signed32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Unsigned8, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, int:Unsigned8, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int:Unsigned8 startIndex = 1; @@ -4696,8 +4797,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned8 integer and value of the second expression is a byte. -Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, int:Unsigned8, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, foreach-stmt, int, int:Unsigned8, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int:Unsigned8 startIndex = 1; @@ -4723,8 +4824,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned8 integer and value of the second expression is a Unsigned16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned16, int:Unsigned8, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Unsigned16, int:Unsigned8, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int:Unsigned8 startIndex = 1; @@ -4750,8 +4851,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned8 integer and value of the second expression is a Unsigned32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned32, int:Unsigned8, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Unsigned32, int:Unsigned8, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int:Unsigned8 startIndex = 1; @@ -4778,8 +4879,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned16 integer and value of the second expression is a positive integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned16, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Unsigned16, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int:Unsigned16 startIndex = 1; @@ -4805,8 +4906,9 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned16 integer and value of the second expression is a positive Signed8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, int:Unsigned16, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed8, int:Unsigned16, isolated-method, + iterable-object, list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, + record-type function init() { int:Unsigned16 startIndex = 1; @@ -4832,8 +4934,9 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned16 integer and value of the second expression is a positive Signed16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Unsigned16, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, int:Unsigned16, + isolated-method, iterable-object, list-constructor-expr, object-type, object-type-inclusion, optional-type, + range-expr, record-type function init() { int:Unsigned16 startIndex = 1; @@ -4859,8 +4962,9 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned16 integer and value of the second expression is a positive Signed32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Unsigned16, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, int:Unsigned16, + isolated-method, iterable-object, list-constructor-expr, object-type, object-type-inclusion, optional-type, + range-expr, record-type function init() { int:Unsigned16 startIndex = 1; @@ -4886,8 +4990,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned16 integer and value of the second expression is a Unsigned8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned16, int:Unsigned8, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Unsigned16, int:Unsigned8, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int:Unsigned16 startIndex = 1; @@ -4914,8 +5018,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned16 integer and value of the second expression is a byte. -Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, int:Unsigned16, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, foreach-stmt, int, int:Unsigned16, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int:Unsigned16 startIndex = 1; @@ -4941,8 +5045,9 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned16 integer and value of the second expression is a Unsigned32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned16, int:Unsigned32, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Unsigned16, int:Unsigned32, + isolated-method, iterable-object, list-constructor-expr, object-type, object-type-inclusion, optional-type, + range-expr, record-type function init() { int:Unsigned16 startIndex = 1; @@ -4968,8 +5073,9 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned32 integer and value of the second expression is a positive integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned32, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Unsigned32, isolated-method, + iterable-object, list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, + record-type function init() { int:Unsigned32 startIndex = 1; @@ -4995,8 +5101,9 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned32 integer and value of the second expression is a positive Signed8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, int:Unsigned32, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed8, int:Unsigned32, + isolated-method, iterable-object, list-constructor-expr, object-type, object-type-inclusion, optional-type, + range-expr, record-type function init() { int:Unsigned32 startIndex = 1; @@ -5022,8 +5129,9 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned32 integer and value of the second expression is a positive Signed16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Unsigned32, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, int:Unsigned32, + isolated-method, iterable-object, list-constructor-expr, object-type, object-type-inclusion, optional-type, + range-expr, record-type function init() { int:Unsigned32 startIndex = 1; @@ -5049,8 +5157,9 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned32 integer and value of the second expression is a positive Signed32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Unsigned32, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, int:Unsigned32, + isolated-method, iterable-object, list-constructor-expr, object-type, object-type-inclusion, optional-type, + range-expr, record-type function init() { int:Unsigned32 startIndex = 1; @@ -5076,8 +5185,9 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned32 integer and value of the second expression is a Unsigned8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned32, int:Unsigned8, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Unsigned32, int:Unsigned8, + isolated-method, iterable-object, list-constructor-expr, object-type, object-type-inclusion, optional-type, + range-expr, record-type function init() { int:Unsigned32 startIndex = 1; @@ -5103,8 +5213,9 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned32 integer and value of the second expression is a byte. -Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, int:Unsigned32, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, foreach-stmt, int, int:Unsigned32, isolated-method, + iterable-object, list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, + record-type function init() { int:Unsigned32 startIndex = 1; @@ -5130,8 +5241,9 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when value of the first expression is a Unsigned32 integer and value of the second expression is a Unsigned16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned16, int:Unsigned32, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Unsigned16, int:Unsigned32, + isolated-method, iterable-object, list-constructor-expr, object-type, object-type-inclusion, optional-type, + range-expr, record-type function init() { int:Unsigned32 startIndex = 1; @@ -5157,8 +5269,9 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when values of both expressions are of user-defined subtypes of int. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-object, list-constructor-expr, - module-type-defn, object-type, optional-type, range-expr, record-type, singleton-type, union-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, isolated-method, iterable-object, + list-constructor-expr, module-type-defn, object-type, object-type-inclusion, optional-type, range-expr, + record-type, singleton-type, union-type type Ints 1|10; @@ -5183,11 +5296,41 @@ function init() { io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } +Description: Test range expression (exclusive) with iterable object when values of both expressions are of singleton + types of int. +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, isolated-method, iterable-object, + list-constructor-expr, module-type-defn, object-type, object-type-inclusion, optional-type, range-expr, + record-type, singleton-type + +type TEN 10; + +function init() { + 1 startIndex = 1; + TEN endIndex = 10; + int count = 0; + int[] arr = []; + + object { + *object:Iterable; + public isolated function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ..< endIndex; + + foreach int i in range { + arr.push(i); + count = count + 1; + } + io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] +} + Test-Case: output Description: Test range expression (exclusive) with iterable object when values of both expressions are of union of int subtypes. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, int:Unsigned32, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type, union-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed8, int:Unsigned32, isolated-method, + iterable-object, list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, + record-type, union-type function init() { int:Signed8|int:Unsigned32 startIndex = 1; @@ -5213,8 +5356,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when the value of the first expression and the value of the second expression is equal. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-object, list-constructor-expr, object-type, - optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int startIndex = 5; @@ -5240,8 +5383,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when the value of the first expression is less than the value of the second expression. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-object, list-constructor-expr, object-type, - optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int startIndex = 5; @@ -5266,8 +5409,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) with iterable object when the types of the expressions are inferred. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-object, list-constructor-expr, object-type, - optional-type, range-expr, record-type, var +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type, var function init() { var startIndex = 1; @@ -5292,8 +5435,8 @@ function init() { Test-Case: output Description: Test range expression (exclusive) when the types of the expressions and type of the range expression are inferred. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-object, list-constructor-expr, range-expr, - var +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, isolated-method, iterable-object, + list-constructor-expr, range-expr, var function init() { var startIndex = 1; @@ -5313,8 +5456,9 @@ function init() { Test-Case: output Description: Test range expression (exclusive) at module level. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-object, list-constructor-expr, object-type, - optional-type, range-expr, record-type, var +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, isolated-method, iterable-object, + list-constructor-expr, module-init-var-decl, object-type, object-type-inclusion, optional-type, range-expr, + record-type, var int startIndex = 1; int endIndex = 10; @@ -5339,9 +5483,9 @@ function init() { } Test-Case: output -Description: Test range expression (exclusive) at module level. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-object, list-constructor-expr, range-expr, - var +Description: Test range expression (exclusive) at module level with var. +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, isolated-method, iterable-object, + list-constructor-expr, module-init-var-decl, range-expr, var int startIndex = 1; int endIndex = 10; @@ -5362,8 +5506,8 @@ function init() { Test-Case: output Description: Test iterable object returned by the range expression (exclusive). -Labels: array-type, array:push, DecimalNumber, int, list-constructor-expr, method-call-expr, object-type, optional-type, - range-expr, value:toBalString, var +Labels: array-type, array:push, DecimalNumber, foreach-stmt, int, list-constructor-expr, method-call-expr, object-type, + optional-type, range-expr, value:toBalString, var function init() { object { @@ -5387,10 +5531,34 @@ function init() { io:println(rec?.value.toBalString()); // @output () } +Test-Case: output +Description: Test int literals as expressions in range expression (exclusive). +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type + +function init() { + int count = 0; + int[] arr = []; + + object { + *object:Iterable; + public isolated function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = 1 ..< 10; + + foreach int i in range { + arr.push(i); + count = count + 1; + } + io:println(count); // @output 9 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9] +} + Test-Case: output Description: Test field and member access as expressions in range expression (exclusive). -Labels: additive-expr, array-type, array:push, DecimalNumber, field-access-expr, int, iterable-object, - list-constructor-expr, mapping-constructor-expr, member-access-expr, module-type-defn, object-type, +Labels: additive-expr, array-type, array:push, DecimalNumber, field-access-expr, foreach-stmt, int, isolated-method, iterable-object, + list-constructor-expr, mapping-constructor-expr, member-access-expr, module-type-defn, object-type, object-type-inclusion, optional-type, range-expr, record-type type Record record { @@ -5420,9 +5588,9 @@ function init() { Test-Case: output Description: Test function and method call as expressions in range expression (exclusive). -Labels: additive-expr, array-type, array:push, DecimalNumber, explicit-new-expr, function-call-expr, int, - iterable-object, list-constructor-expr, method-call-expr, module-class-defn, object-type, optional-type, - range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, explicit-new-expr, foreach-stmt, function-call-expr, int, + isolated-method, iterable-object, list-constructor-expr, method-call-expr, module-class-defn, object-type, + object-type-inclusion, optional-type, range-expr, record-type class Class { function getInt() returns int { @@ -5456,8 +5624,9 @@ function getInt() returns int { Test-Case: output Description: Test type cast expression as expressions in range expression (exclusive). -Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-object, list-constructor-expr, object-type, - optional-type, range-expr, record-type, type-cast-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type, + type-cast-expr function init() { int count = 0; @@ -5480,8 +5649,9 @@ function init() { Test-Case: output Description: Test unary expressions as expressions in range expression (exclusive). -Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-object, list-constructor-expr, object-type, - optional-type, range-expr, record-type, unary-complement, unary-minus, unary-plus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type, + unary-complement, unary-minus, unary-plus function init() { int count = 0; @@ -5515,8 +5685,8 @@ function init() { Test-Case: output Description: Test additive expression as expressions in range expression (exclusive). -Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-object, list-constructor-expr, object-type, - optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int count = 0; @@ -5539,8 +5709,9 @@ function init() { Test-Case: output Description: Test multiplicative expressions as expressions in range expression (exclusive). -Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-object, list-constructor-expr, - multiplicative-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, isolated-method, iterable-object, + list-constructor-expr, multiplicative-expr, object-type, object-type-inclusion, optional-type, range-expr, + record-type function init() { int count = 0; @@ -5574,8 +5745,9 @@ function init() { Test-Case: output Description: Test binary bitwise expressions as expressions in range expression (exclusive). -Labels: additive-expr, array-type, array:push, binary-bitwise-expr, DecimalNumber, int, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, binary-bitwise-expr, DecimalNumber, foreach-stmt, int, isolated-method, + iterable-object, list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, + record-type function init() { int count = 0; @@ -5609,8 +5781,9 @@ function init() { Test-Case: output Description: Test checking expressions as expressions in range expression (exclusive). -Labels: additive-expr, array-type, array:push, check, checkpanic, DecimalNumber, error, int, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type, union-type +Labels: additive-expr, array-type, array:push, check, checkpanic, DecimalNumber, error, foreach-stmt, int, isolated-method, + iterable-object, list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, + record-type, union-type function init() returns error? { int|error startIndex = 2; @@ -5635,8 +5808,8 @@ function init() returns error? { Test-Case: output Description: Test let expression as expressions in range expression (exclusive). -Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-object, let-expr, list-constructor-expr, - object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, isolated-method, iterable-object, + let-expr, list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int count = 0; @@ -5659,8 +5832,8 @@ function init() { Test-Case: output Description: Test shift expressions as expressions in range expression (exclusive). -Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-object, list-constructor-expr, object-type, - optional-type, range-expr, record-type, shift-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type, shift-expr function init() { int count = 0; @@ -5683,8 +5856,9 @@ function init() { Test-Case: output Description: Test conditional expressions as expressions in range expression (exclusive). -Labels: additive-expr, array-type, array:push, conditional-expr, DecimalNumber, error, int, iterable-object, - list-constructor-expr, nil-literal, object-type, optional-type, range-expr, record-type, union-type +Labels: additive-expr, array-type, array:push, conditional-expr, DecimalNumber, error, foreach-stmt, int, isolated-method, + iterable-object, list-constructor-expr, nil-literal, object-type, object-type-inclusion, optional-type, + range-expr, record-type, union-type function init() { int|error a = 10; @@ -5709,8 +5883,8 @@ function init() { Test-Case: output Description: Test lang.int constants as expressions in range expression (exclusive). -Labels: additive-expr, DecimalNumber, int, int:SIGNED8_MAX_VALUE, int:UNSIGNED8_MAX_VALUE, iterable-object, object-type, - optional-type, range-expr, record-type +Labels: additive-expr, DecimalNumber, foreach-stmt, int, int:SIGNED8_MAX_VALUE, int:UNSIGNED8_MAX_VALUE, isolated-method, + iterable-object, object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int count = 0; @@ -5730,8 +5904,9 @@ function init() { Test-Case: output Description: Test isolatedness of range expression (exclusive). -Labels: additive-expr, array-type, array:push, DecimalNumber, function-call-expr, int, iterable-object, - list-constructor-expr, lock-stmt, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, function-call-expr, int, isolated-method, + iterable-object, list-constructor-expr, lock-stmt, object-type, object-type-inclusion, optional-type, + range-expr, record-type isolated int j = 1; @@ -5759,8 +5934,8 @@ function getRange() returns object { Test-Case: output Description: Test isolatedness of the resultant object of the range expression (exclusive). -Labels: any, array-type, array:push, int, is-expr, list-constructor-expr, object-type, optional-type, range-expr, - record-type, type-cast-expr +Labels: any, array-type, array:push, int, is-expr, isolated-method, list-constructor-expr, object-type, + object-type-inclusion, optional-type, range-expr, record-type, type-cast-expr function init() { object { @@ -5805,7 +5980,7 @@ Test-Case: error Description: Test range expression (exclusive) when static type of either of the expression is not a subtype of int. Labels: DecimalFloatingPointNumber, int, range-expr, string -function init() { +function errorFunction() { _ = 1.0 ..< 10; // @error ..< not defined when static type of either of the expression is not a subtype of int _ = 1 ..< 10.0; // @error ..< not defined when static type of either of the expression is not a subtype of int _ = 1.0 ..< 10.0; // @error ..< not defined when static type of either of the expression is not a subtype of int @@ -5817,9 +5992,9 @@ function init() { Test-Case: error Description: Test assigning the result of range expression (exclusive) to an incompatible type. -Labels: DecimalNumber, float, int, object-type, optional-type, range-expr, record-type +Labels: DecimalNumber, float, int, isolated-method, object-type, optional-type, range-expr, record-type -function init() { +function errorFunction() { int _ = 1 ..< 10; // @error expects an int, but the result of a range expression is an object object { @@ -5832,9 +6007,9 @@ function init() { Test-Case: error Description: Test assigning the result of range expression (exclusive) to an incompatible type when the static type of the range expression is inferred. -Labels: DecimalNumber, float, int, object-type, optional-type, range-expr, record-type, var +Labels: DecimalNumber, float, int, isolated-method, object-type, optional-type, range-expr, record-type, var -function init() { +function errorFunction() { var a = 1 ..< 10; int _ = a; // @error expects an int, but the result of a range expression is an object diff --git a/conformance/lang/expressions/range-expr/range_expr_inclusive.balt b/conformance/lang/expressions/range-expr/range_expr_inclusive.balt index 425d1221..0c83c0cb 100644 --- a/conformance/lang/expressions/range-expr/range_expr_inclusive.balt +++ b/conformance/lang/expressions/range-expr/range_expr_inclusive.balt @@ -1,6 +1,7 @@ Test-Case: output Description: Test range expression (inclusive) when values of both expressions are positive integers. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-inclusive, list-constructor-expr, range-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, iterable-inclusive, list-constructor-expr, + range-expr function init() { int startIndex = 0; @@ -17,7 +18,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when values of both expressions are negative integers. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-inclusive, list-constructor-expr, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, iterable-inclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -36,7 +37,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when the value of one expression is a negative integer and the value of the other expression is a positive integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-inclusive, list-constructor-expr, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, iterable-inclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -55,7 +56,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when the value of one expression is a negative integer and the value of the other expression is a positive integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-inclusive, list-constructor-expr, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, iterable-inclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -70,7 +71,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when values of both expressions are positive Signed8 integers. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed8, iterable-inclusive, list-constructor-expr, range-expr function init() { @@ -88,7 +89,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when values of both expressions are negative Signed8 integers. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed8, iterable-inclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -107,7 +108,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when the value of one expression is a negative Signed8 integer and the value of the other expression is a positive Signed8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed8, iterable-inclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -125,7 +126,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when values of both expressions are positive Signed16 integers. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, iterable-inclusive, list-constructor-expr, range-expr function init() { @@ -143,7 +144,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when values of both expressions are negative Signed16 integers. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, iterable-inclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -162,7 +163,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when the value of one expression is a negative Signed16 integer and the value of the other expression is a positive Signed16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, iterable-inclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -180,7 +181,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when values of both expressions are positive Signed32 integers. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, iterable-inclusive, list-constructor-expr, range-expr function init() { @@ -198,7 +199,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when values of both expressions are negative Signed32 integers. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, iterable-inclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -217,7 +218,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when the value of one expression is a negative Signed32 integer and the value of the other expression is a positive Signed32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, iterable-inclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -235,7 +236,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when values of both expressions are Unsigned8 integers. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned8, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Unsigned8, iterable-inclusive, list-constructor-expr, range-expr function init() { @@ -251,9 +252,27 @@ function init() { io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } +Test-Case: output +Description: Test range expression (inclusive) when values of both expressions are bytes. +Labels: additive-expr, array-type, array:push, bytes, DecimalNumber, foreach-stmt, int, iterable-inclusive, + list-constructor-expr, range-expr + +function init() { + byte startIndex = 1; + byte endIndex = 10; + int count = 0; + int[] arr = []; + foreach int i in startIndex ... endIndex { + arr.push(i); + count = count + 1; + } + io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] +} + Test-Case: output Description: Test range expression (inclusive) when values of both expressions are Unsigned16 integers. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned16, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Unsigned16, iterable-inclusive, list-constructor-expr, range-expr function init() { @@ -271,7 +290,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when values of both expressions are Unsigned32 integers. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned32, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Unsigned32, iterable-inclusive, list-constructor-expr, range-expr function init() { @@ -290,7 +309,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive integer and value of the second expression is a positive Signed8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed8, iterable-inclusive, list-constructor-expr, range-expr function init() { @@ -309,7 +328,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative integer and value of the second expression is a negative Signed8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed8, iterable-inclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -328,7 +347,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative integer and value of the second expression is a positive Signed8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed8, iterable-inclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -348,7 +367,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive integer and value of the second expression is a positive Signed16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, iterable-inclusive, list-constructor-expr, range-expr function init() { @@ -367,7 +386,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative integer and value of the second expression is a negative Signed16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, iterable-inclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -386,7 +405,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative integer and value of the second expression is a positive Signed16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, iterable-inclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -405,7 +424,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive integer and value of the second expression is a positive Signed32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, iterable-inclusive, list-constructor-expr, range-expr function init() { @@ -424,7 +443,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative integer and value of the second expression is a negative Signed32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, iterable-inclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -443,7 +462,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative integer and value of the second expression is a positive Signed32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, iterable-inclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -462,7 +481,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive integer and value of the second expression is a Unsigned8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned8, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Unsigned8, iterable-inclusive, list-constructor-expr, range-expr function init() { @@ -481,7 +500,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative integer and value of the second expression is a Unsigned8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned8, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Unsigned8, iterable-inclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -500,7 +519,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive integer and value of the second expression is a byte. -Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, iterable-inclusive, list-constructor-expr, +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, foreach-stmt, int, iterable-inclusive, list-constructor-expr, range-expr function init() { @@ -519,7 +538,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative integer and value of the second expression is a byte. -Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, iterable-inclusive, list-constructor-expr, +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, foreach-stmt, int, iterable-inclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -538,7 +557,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive integer and value of the second expression is a Unsigned16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned16, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Unsigned16, iterable-inclusive, list-constructor-expr, range-expr function init() { @@ -557,7 +576,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative integer and value of the second expression is a Unsigned16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned16, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Unsigned16, iterable-inclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -576,7 +595,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive integer and value of the second expression is a Unsigned32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned32, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Unsigned32, iterable-inclusive, list-constructor-expr, range-expr function init() { @@ -595,7 +614,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative integer and value of the second expression is a Unsigned32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned32, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Unsigned32, iterable-inclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -614,7 +633,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive Signed8 integer and value of the second expression is a positive integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed8, iterable-inclusive, list-constructor-expr, range-expr function init() { @@ -633,7 +652,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a negative integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed8, iterable-inclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -652,7 +671,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a positive integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed8, iterable-inclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -671,7 +690,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive Signed8 integer and value of the second expression is a positive Signed16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed8, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, int:Signed8, iterable-inclusive, list-constructor-expr, range-expr function init() { @@ -690,7 +709,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a negative Signed16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed8, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, int:Signed8, iterable-inclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -709,7 +728,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a positive Signed16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed8, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, int:Signed8, iterable-inclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -728,7 +747,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive Signed8 integer and value of the second expression is a positive Signed32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Signed8, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, int:Signed8, iterable-inclusive, list-constructor-expr, range-expr function init() { @@ -747,7 +766,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a negative Signed32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Signed8, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, int:Signed8, iterable-inclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -766,7 +785,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a positive Signed32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Signed8, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, int:Signed8, iterable-inclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -785,7 +804,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive Signed8 integer and value of the second expression is a Unsigned8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, int:Unsigned8, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed8, int:Unsigned8, iterable-inclusive, list-constructor-expr, range-expr function init() { @@ -804,7 +823,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a Unsigned8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, int:Unsigned8, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed8, int:Unsigned8, iterable-inclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -823,7 +842,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive Signed8 integer and value of the second expression is a byte. -Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, int:Signed8, iterable-inclusive, +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, foreach-stmt, int, int:Signed8, iterable-inclusive, list-constructor-expr, range-expr function init() { @@ -842,7 +861,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a byte. -Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, int:Signed8, iterable-inclusive, +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, foreach-stmt, int, int:Signed8, iterable-inclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -861,7 +880,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive Signed8 integer and value of the second expression is a Unsigned16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, int:Unsigned16, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed8, int:Unsigned16, iterable-inclusive, list-constructor-expr, range-expr function init() { @@ -880,7 +899,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a Unsigned16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, int:Unsigned16, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed8, int:Unsigned16, iterable-inclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -899,7 +918,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive Signed8 integer and value of the second expression is a Unsigned32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, int:Unsigned32, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed8, int:Unsigned32, iterable-inclusive, list-constructor-expr, range-expr function init() { @@ -918,7 +937,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed8 integer and value of the second expression is a Unsigned32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, int:Unsigned32, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed8, int:Unsigned32, iterable-inclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -937,7 +956,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive Signed16 integer and value of the second expression is a positive integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, iterable-inclusive, list-constructor-expr, range-expr function init() { @@ -956,7 +975,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a negative integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, iterable-inclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -975,7 +994,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a positive integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, iterable-inclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -994,7 +1013,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive Signed16 integer and value of the second expression is a positive Signed8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed8, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, int:Signed8, iterable-inclusive, list-constructor-expr, range-expr function init() { @@ -1013,7 +1032,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a negative Signed8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed8, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, int:Signed8, iterable-inclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -1032,7 +1051,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a positive Signed8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed8, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, int:Signed8, iterable-inclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -1051,7 +1070,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive Signed16 integer and value of the second expression is a positive Signed32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed32, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, int:Signed32, iterable-inclusive, list-constructor-expr, range-expr function init() { @@ -1070,7 +1089,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a negative Signed32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed32, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, int:Signed32, iterable-inclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -1089,7 +1108,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a positive Signed32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed32, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, int:Signed32, iterable-inclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -1108,7 +1127,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive Signed16 integer and value of the second expression is a Unsigned8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Unsigned8, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, int:Unsigned8, iterable-inclusive, list-constructor-expr, range-expr function init() { @@ -1127,7 +1146,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a Unsigned8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Unsigned8, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, int:Unsigned8, iterable-inclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -1146,7 +1165,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive Signed16 integer and value of the second expression is a byte. -Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, int:Signed16, iterable-inclusive, +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, foreach-stmt, int, int:Signed16, iterable-inclusive, list-constructor-expr, range-expr function init() { @@ -1165,7 +1184,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a byte. -Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, int:Signed16, iterable-inclusive, +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, foreach-stmt, int, int:Signed16, iterable-inclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -1184,7 +1203,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive Signed16 integer and value of the second expression is a Unsigned16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Unsigned16, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, int:Unsigned16, iterable-inclusive, list-constructor-expr, range-expr function init() { @@ -1203,7 +1222,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a Unsigned16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Unsigned16, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, int:Unsigned16, iterable-inclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -1222,7 +1241,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive Signed16 integer and value of the second expression is a Unsigned32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Unsigned32, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, int:Unsigned32, iterable-inclusive, list-constructor-expr, range-expr function init() { @@ -1241,7 +1260,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed16 integer and value of the second expression is a Unsigned32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Unsigned32, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, int:Unsigned32, iterable-inclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -1260,7 +1279,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive Signed32 integer and value of the second expression is a positive integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, iterable-inclusive, list-constructor-expr, range-expr function init() { @@ -1279,7 +1298,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a negative integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, iterable-inclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -1298,7 +1317,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a positive integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, iterable-inclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -1317,7 +1336,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive Signed32 integer and value of the second expression is a positive Signed8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Signed8, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, int:Signed8, iterable-inclusive, list-constructor-expr, range-expr function init() { @@ -1336,7 +1355,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a negative Signed8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Signed8, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, int:Signed8, iterable-inclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -1355,7 +1374,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a positive Signed8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Signed8, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, int:Signed8, iterable-inclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -1374,7 +1393,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive Signed32 integer and value of the second expression is a positive Signed16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed32, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, int:Signed32, iterable-inclusive, list-constructor-expr, range-expr function init() { @@ -1393,7 +1412,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a negative Signed16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed32, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, int:Signed32, iterable-inclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -1412,7 +1431,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a positive Signed16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed32, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, int:Signed32, iterable-inclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -1431,7 +1450,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive Signed32 integer and value of the second expression is a Unsigned8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Unsigned8, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, int:Unsigned8, iterable-inclusive, list-constructor-expr, range-expr function init() { @@ -1450,7 +1469,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a Unsigned8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Unsigned8, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, int:Unsigned8, iterable-inclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -1469,7 +1488,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive Signed32 integer and value of the second expression is a byte. -Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, int:Signed32, iterable-inclusive, +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, foreach-stmt, int, int:Signed32, iterable-inclusive, list-constructor-expr, range-expr function init() { @@ -1488,7 +1507,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a byte. -Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, int:Signed32, iterable-inclusive, +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, foreach-stmt, int, int:Signed32, iterable-inclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -1507,7 +1526,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive Signed32 integer and value of the second expression is a Unsigned16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Unsigned16, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, int:Unsigned16, iterable-inclusive, list-constructor-expr, range-expr function init() { @@ -1526,7 +1545,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a Unsigned16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Unsigned16, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, int:Unsigned16, iterable-inclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -1545,7 +1564,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a positive Signed32 integer and value of the second expression is a Unsigned32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Unsigned32, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, int:Unsigned32, iterable-inclusive, list-constructor-expr, range-expr function init() { @@ -1564,7 +1583,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a negative Signed32 integer and value of the second expression is a Unsigned32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Unsigned32, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, int:Unsigned32, iterable-inclusive, list-constructor-expr, range-expr, unary-minus function init() { @@ -1583,7 +1602,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a Unsigned8 integer and value of the second expression is a positive integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned8, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Unsigned8, iterable-inclusive, list-constructor-expr, range-expr function init() { @@ -1602,7 +1621,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a Unsigned8 integer and value of the second expression is a positive Signed8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, int:Unsigned8, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed8, int:Unsigned8, iterable-inclusive, list-constructor-expr, range-expr function init() { @@ -1621,7 +1640,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a Unsigned8 integer and value of the second expression is a positive Signed16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Unsigned8, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, int:Unsigned8, iterable-inclusive, list-constructor-expr, range-expr function init() { @@ -1640,7 +1659,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a Unsigned8 integer and value of the second expression is a positive Signed32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Unsigned8, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, int:Unsigned8, iterable-inclusive, list-constructor-expr, range-expr function init() { @@ -1659,7 +1678,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a Unsigned8 integer and value of the second expression is a byte. -Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, int:Unsigned8, iterable-inclusive, +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, foreach-stmt, int, int:Unsigned8, iterable-inclusive, list-constructor-expr, range-expr function init() { @@ -1678,7 +1697,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a Unsigned8 integer and value of the second expression is a Unsigned16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned16, int:Unsigned8, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Unsigned16, int:Unsigned8, iterable-inclusive, list-constructor-expr, range-expr function init() { @@ -1697,7 +1716,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a Unsigned8 integer and value of the second expression is a Unsigned32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned32, int:Unsigned8, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Unsigned32, int:Unsigned8, iterable-inclusive, list-constructor-expr, range-expr function init() { @@ -1716,7 +1735,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a Unsigned16 integer and value of the second expression is a positive integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned16, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Unsigned16, iterable-inclusive, list-constructor-expr, range-expr function init() { @@ -1735,7 +1754,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a Unsigned16 integer and value of the second expression is a positive Signed8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, int:Unsigned16, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed8, int:Unsigned16, iterable-inclusive, list-constructor-expr, range-expr function init() { @@ -1754,7 +1773,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a Unsigned16 integer and value of the second expression is a positive Signed16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Unsigned16, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, int:Unsigned16, iterable-inclusive, list-constructor-expr, range-expr function init() { @@ -1773,7 +1792,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a Unsigned16 integer and value of the second expression is a positive Signed32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Unsigned16, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, int:Unsigned16, iterable-inclusive, list-constructor-expr, range-expr function init() { @@ -1792,7 +1811,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a Unsigned16 integer and value of the second expression is a Unsigned8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned16, int:Unsigned8, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Unsigned16, int:Unsigned8, iterable-inclusive, list-constructor-expr, range-expr function init() { @@ -1811,7 +1830,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a Unsigned16 integer and value of the second expression is a byte. -Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, int:Unsigned16, iterable-inclusive, +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, foreach-stmt, int, int:Unsigned16, iterable-inclusive, list-constructor-expr, range-expr function init() { @@ -1830,7 +1849,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a Unsigned16 integer and value of the second expression is a Unsigned32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned16, int:Unsigned32, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Unsigned16, int:Unsigned32, iterable-inclusive, list-constructor-expr, range-expr function init() { @@ -1849,7 +1868,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a Unsigned32 integer and value of the second expression is a positive integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned32, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Unsigned32, iterable-inclusive, list-constructor-expr, range-expr function init() { @@ -1868,7 +1887,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a Unsigned32 integer and value of the second expression is a positive Signed8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, int:Unsigned32, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed8, int:Unsigned32, iterable-inclusive, list-constructor-expr, range-expr function init() { @@ -1887,7 +1906,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a Unsigned32 integer and value of the second expression is a positive Signed16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Unsigned32, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, int:Unsigned32, iterable-inclusive, list-constructor-expr, range-expr function init() { @@ -1906,7 +1925,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a Unsigned32 integer and value of the second expression is a positive Signed32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Unsigned32, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, int:Unsigned32, iterable-inclusive, list-constructor-expr, range-expr function init() { @@ -1925,7 +1944,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a Unsigned32 integer and value of the second expression is a Unsigned8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned32, int:Unsigned8, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Unsigned32, int:Unsigned8, iterable-inclusive, list-constructor-expr, range-expr function init() { @@ -1944,7 +1963,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a Unsigned32 integer and value of the second expression is a byte. -Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, int:Unsigned32, iterable-inclusive, +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, foreach-stmt, int, int:Unsigned32, iterable-inclusive, list-constructor-expr, range-expr function init() { @@ -1963,7 +1982,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when value of the first expression is a Unsigned32 integer and value of the second expression is a Unsigned16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned16, int:Unsigned32, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Unsigned16, int:Unsigned32, iterable-inclusive, list-constructor-expr, range-expr function init() { @@ -1981,7 +2000,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when values of both expressions are of user-defined subtypes of int. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-inclusive, list-constructor-expr, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, iterable-inclusive, list-constructor-expr, module-type-defn, range-expr, singleton-type, union-type type Ints 1|10; @@ -1999,9 +2018,29 @@ function init() { io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } +Test-Case: output +Description: Test range expression (inclusive) when values of both expressions are of singleton types of int. +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, iterable-inclusive, list-constructor-expr, + module-type-defn, range-expr, singleton-type + +type TEN 10; + +function init() { + 1 startIndex = 1; + TEN endIndex = 10; + int count = 0; + int[] arr = []; + foreach int i in startIndex ... endIndex { + arr.push(i); + count = count + 1; + } + io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] +} + Test-Case: output Description: Test range expression (inclusive) when values of both expressions are of union of int subtypes. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, int:Unsigned32, iterable-inclusive, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed8, int:Unsigned32, iterable-inclusive, list-constructor-expr, range-expr, union-type function init() { @@ -2020,7 +2059,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when the value of the first expression and the value of the second expression is equal. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-inclusive, list-constructor-expr, range-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, iterable-inclusive, list-constructor-expr, range-expr function init() { int startIndex = 5; @@ -2039,7 +2078,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when the value of the first expression is less than the value of the second expression. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-inclusive, list-constructor-expr, range-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, iterable-inclusive, list-constructor-expr, range-expr function init() { int startIndex = 5; @@ -2057,7 +2096,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when the types of the expressions are inferred. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-inclusive, list-constructor-expr, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, iterable-inclusive, list-constructor-expr, range-expr, var function init() { @@ -2074,9 +2113,26 @@ function init() { io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } +Test-Case: output +Description: Test int literals as expressions in range expression (inclusive). +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, iterable-inclusive, list-constructor-expr, + range-expr + +function init() { + int count = 0; + int[] arr = []; + + foreach int i in 1 ... 10 { + arr.push(i); + count = count + 1; + } + io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] +} + Test-Case: output Description: Test field and member access as expressions in range expression (inclusive). -Labels: array-type, array:push, DecimalNumber, field-access-expr, int, iterable-inclusive, list-constructor-expr, +Labels: array-type, array:push, DecimalNumber, field-access-expr, foreach-stmt, int, iterable-inclusive, list-constructor-expr, mapping-constructor-expr, member-access-expr, module-type-defn, range-expr, record-type type Record record { @@ -2099,7 +2155,7 @@ function init() { Test-Case: output Description: Test function and method call as expressions in range expression (inclusive). -Labels: array-type, array:push, DecimalNumber, explicit-new-expr, function-call-expr, int, iterable-inclusive, +Labels: array-type, array:push, DecimalNumber, explicit-new-expr, foreach-stmt, function-call-expr, int, iterable-inclusive, list-constructor-expr, method-call-expr, module-class-defn, range-expr class Class { @@ -2127,7 +2183,7 @@ function getInt() returns int { Test-Case: output Description: Test type cast expression as expressions in range expression (inclusive). -Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-inclusive, list-constructor-expr, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, iterable-inclusive, list-constructor-expr, range-expr, type-cast-expr function init() { @@ -2144,7 +2200,7 @@ function init() { Test-Case: output Description: Test unary expressions as expressions in range expression (inclusive). -Labels: array-type, array:push, DecimalNumber, int, iterable-inclusive, list-constructor-expr, range-expr, +Labels: array-type, array:push, DecimalNumber, foreach-stmt, int, iterable-inclusive, list-constructor-expr, range-expr, unary-complement, unary-minus, unary-plus function init() { @@ -2170,7 +2226,7 @@ function init() { Test-Case: output Description: Test additive expression as expressions in range expression (inclusive). -Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-inclusive, list-constructor-expr, range-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, iterable-inclusive, list-constructor-expr, range-expr function init() { int count = 0; @@ -2186,7 +2242,7 @@ function init() { Test-Case: output Description: Test multiplicative expressions as expressions in range expression (inclusive). -Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-inclusive, list-constructor-expr, +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, iterable-inclusive, list-constructor-expr, multiplicative-expr, range-expr function init() { @@ -2212,7 +2268,7 @@ function init() { Test-Case: output Description: Test binary bitwise expressions as expressions in range expression (inclusive). -Labels: additive-expr, array-type, array:push, binary-bitwise-expr, DecimalNumber, int, iterable-inclusive, +Labels: additive-expr, array-type, array:push, binary-bitwise-expr, DecimalNumber, foreach-stmt, int, iterable-inclusive, list-constructor-expr, range-expr function init() { @@ -2238,7 +2294,7 @@ function init() { Test-Case: output Description: Test checking expressions as expressions in range expression (inclusive). -Labels: array-type, array:push, check, checkpanic, DecimalNumber, error, int, iterable-inclusive, list-constructor-expr, +Labels: array-type, array:push, check, checkpanic, DecimalNumber, error, foreach-stmt, int, iterable-inclusive, list-constructor-expr, optional-type, range-expr, union-type function init() returns error? { @@ -2257,7 +2313,7 @@ function init() returns error? { Test-Case: output Description: Test let expression as expressions in range expression (inclusive). -Labels: array-type, array:push, DecimalNumber, int, iterable-inclusive, let-expr, list-constructor-expr, range-expr +Labels: array-type, array:push, DecimalNumber, foreach-stmt, int, iterable-inclusive, let-expr, list-constructor-expr, range-expr function init() { int count = 0; @@ -2273,7 +2329,7 @@ function init() { Test-Case: output Description: Test shift expressions as expressions in range expression (inclusive). -Labels: array-type, array:push, DecimalNumber, int, iterable-inclusive, list-constructor-expr, range-expr, shift-expr +Labels: array-type, array:push, DecimalNumber, foreach-stmt, int, iterable-inclusive, list-constructor-expr, range-expr, shift-expr function init() { int count = 0; @@ -2289,7 +2345,7 @@ function init() { Test-Case: output Description: Test conditional expressions as expressions in range expression (inclusive). -Labels: array-type, array:push, binary-conditional-expr, DecimalNumber, error, int, iterable-inclusive, +Labels: array-type, array:push, binary-conditional-expr, DecimalNumber, error, foreach-stmt, int, iterable-inclusive, list-constructor-expr, nil-literal, optional-type, range-expr, ternary-conditional-expr, union-type function init() { @@ -2308,7 +2364,7 @@ function init() { Test-Case: output Description: Test lang.int constants as expressions in range expression (inclusive). -Labels: int, int:SIGNED8_MAX_VALUE, int:UNSIGNED8_MAX_VALUE, iterable-inclusive, range-expr +Labels: foreach-stmt, int, int:SIGNED8_MAX_VALUE, int:UNSIGNED8_MAX_VALUE, iterable-inclusive, range-expr function init() { int count = 0; @@ -2321,8 +2377,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when values of both expressions are positive integers. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-object, list-constructor-expr, object-type, - optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int startIndex = 0; @@ -2347,8 +2403,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when values of both expressions are negative integers. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-object, list-constructor-expr, object-type, - optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type, unary-minus function init() { int startIndex = -6; @@ -2374,8 +2430,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when the value of one expression is a negative integer and the value of the other expression is a positive integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-object, list-constructor-expr, object-type, - optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type, unary-minus function init() { int startIndex = -10; @@ -2401,8 +2457,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when the value of one expression is a negative integer and the value of the other expression is a positive integer. -Labels: additive-expr, DecimalNumber, int, iterable-object, object-type, optional-type, range-expr, record-type, - unary-minus +Labels: additive-expr, DecimalNumber, foreach-stmt, int, isolated-method, iterable-object, object-type, object-type-inclusion, + optional-type, range-expr, record-type, unary-minus function init() { int startIndex = -7635315; @@ -2425,8 +2481,9 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when values of both expressions are positive Signed8 integers. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, iterable-object, list-constructor-expr, - object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed8, isolated-method, + iterable-object, list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, + record-type function init() { int:Signed8 startIndex = 1; @@ -2452,8 +2509,9 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when values of both expressions are negative Signed8 integers. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, iterable-object, list-constructor-expr, - object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed8, isolated-method, + iterable-object, list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, + record-type, unary-minus function init() { int:Signed8 startIndex = -10; @@ -2479,8 +2537,9 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when the value of one expression is a negative Signed8 integer and the value of the other expression is a positive Signed8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, iterable-object, list-constructor-expr, - object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed8, isolated-method, + iterable-object, list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, + record-type, unary-minus function init() { int:Signed8 startIndex = -10; @@ -2506,8 +2565,9 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when values of both expressions are positive Signed16 integers. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, iterable-object, list-constructor-expr, - object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, isolated-method, + iterable-object, list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, + record-type function init() { int:Signed16 startIndex = 1; @@ -2533,8 +2593,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when values of both expressions are negative Signed16 integers. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, iterable-object, list-constructor-expr, - object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, isolated-method, iterable-object, list-constructor-expr, + object-type, object-type-inclusion, optional-type, range-expr, record-type, unary-minus function init() { int:Signed16 startIndex = -10; @@ -2560,8 +2620,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when the value of one expression is a negative Signed16 integer and the value of the other expression is a positive Signed16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, iterable-object, list-constructor-expr, - object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, isolated-method, iterable-object, list-constructor-expr, + object-type, object-type-inclusion, optional-type, range-expr, record-type, unary-minus function init() { int:Signed16 startIndex = -10; @@ -2587,8 +2647,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when values of both expressions are positive Signed32 integers. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, iterable-object, list-constructor-expr, - object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, isolated-method, iterable-object, list-constructor-expr, + object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int:Signed32 startIndex = 1; @@ -2614,8 +2674,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when values of both expressions are negative Signed32 integers. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, iterable-object, list-constructor-expr, - object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, isolated-method, iterable-object, list-constructor-expr, + object-type, object-type-inclusion, optional-type, range-expr, record-type, unary-minus function init() { int:Signed32 startIndex = -10; @@ -2641,8 +2701,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when the value of one expression is a negative Signed32 integer and the value of the other expression is a positive Signed32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, iterable-object, list-constructor-expr, - object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, isolated-method, iterable-object, list-constructor-expr, + object-type, object-type-inclusion, optional-type, range-expr, record-type, unary-minus function init() { int:Signed32 startIndex = -10; @@ -2668,8 +2728,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when values of both expressions are Unsigned8 integers. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned8, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Unsigned8, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int:Unsigned8 startIndex = 1; @@ -2692,11 +2752,37 @@ function init() { io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } +Test-Case: output +Description: Test range expression (inclusive) with iterable object when values of both expressions are bytes. +Labels: additive-expr, array-type, array:push, bytes, DecimalNumber, foreach-stmt, int, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type + +function init() { + bytes startIndex = 1; + bytes endIndex = 10; + int count = 0; + int[] arr = []; + + object { + *object:Iterable; + public isolated function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ... endIndex; + + foreach int i in range { + arr.push(i); + count = count + 1; + } + io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] +} + Test-Case: output Description: Test range expression (inclusive) with iterable object when values of both expressions are Unsigned16 integers. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned16, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Unsigned16, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type, unary-minus function init() { int:Unsigned16 startIndex = 1; @@ -2722,8 +2808,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when values of both expressions are Unsigned32 integers. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned32, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Unsigned32, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type, unary-minus function init() { int:Unsigned32 startIndex = 1; @@ -2749,8 +2835,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive integer and value of the second expression is a positive Signed8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, iterable-object, list-constructor-expr, - object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed8, isolated-method, iterable-object, list-constructor-expr, + object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int startIndex = 1; @@ -2776,8 +2862,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative integer and value of the second expression is a negative Signed8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, iterable-object, list-constructor-expr, - object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed8, isolated-method, iterable-object, list-constructor-expr, + object-type, object-type-inclusion, optional-type, range-expr, record-type, unary-minus function init() { int startIndex = -10; @@ -2803,8 +2889,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative integer and value of the second expression is a positive Signed8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, iterable-object, list-constructor-expr, - object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed8, isolated-method, iterable-object, list-constructor-expr, + object-type, object-type-inclusion, optional-type, range-expr, record-type, unary-minus function init() { int startIndex = -10; @@ -2830,8 +2916,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive integer and value of the second expression is a positive Signed16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, iterable-object, list-constructor-expr, - object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, isolated-method, iterable-object, list-constructor-expr, + object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int startIndex = 1; @@ -2857,8 +2943,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative integer and value of the second expression is a negative Signed16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, iterable-object, list-constructor-expr, - object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, isolated-method, iterable-object, list-constructor-expr, + object-type, object-type-inclusion, optional-type, range-expr, record-type, unary-minus function init() { int startIndex = -10; @@ -2884,8 +2970,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative integer and value of the second expression is a positive Signed16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, iterable-object, list-constructor-expr, - object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, isolated-method, iterable-object, list-constructor-expr, + object-type, object-type-inclusion, optional-type, range-expr, record-type, unary-minus function init() { int startIndex = -10; @@ -2911,8 +2997,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive integer and value of the second expression is a positive Signed32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, iterable-object, list-constructor-expr, - object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, isolated-method, iterable-object, list-constructor-expr, + object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int startIndex = 1; @@ -2938,8 +3024,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative integer and value of the second expression is a negative Signed32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, iterable-object, list-constructor-expr, - object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, isolated-method, iterable-object, list-constructor-expr, + object-type, object-type-inclusion, optional-type, range-expr, record-type, unary-minus function init() { int startIndex = -10; @@ -2965,8 +3051,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative integer and value of the second expression is a positive Signed32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, iterable-object, list-constructor-expr, - object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, isolated-method, iterable-object, list-constructor-expr, + object-type, object-type-inclusion, optional-type, range-expr, record-type, unary-minus function init() { int startIndex = -10; @@ -2992,8 +3078,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive integer and value of the second expression is a Unsigned8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned8, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Unsigned8, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int startIndex = 1; @@ -3019,8 +3105,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative integer and value of the second expression is a Unsigned8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned8, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Unsigned8, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type, unary-minus function init() { int startIndex = -10; @@ -3046,8 +3132,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive integer and value of the second expression is a byte. -Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, iterable-object, list-constructor-expr, - object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, foreach-stmt, int, isolated-method, iterable-object, list-constructor-expr, + object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int startIndex = 1; @@ -3073,8 +3159,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative integer and value of the second expression is a byte. -Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, iterable-object, list-constructor-expr, - object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, foreach-stmt, int, isolated-method, iterable-object, list-constructor-expr, + object-type, object-type-inclusion, optional-type, range-expr, record-type, unary-minus function init() { int startIndex = -10; @@ -3100,8 +3186,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive integer and value of the second expression is a Unsigned16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned16, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Unsigned16, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int startIndex = 1; @@ -3127,8 +3213,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative integer and value of the second expression is a Unsigned16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned16, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Unsigned16, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type, unary-minus function init() { int startIndex = -10; @@ -3154,8 +3240,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive integer and value of the second expression is a Unsigned32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned32, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Unsigned32, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int startIndex = 1; @@ -3181,8 +3267,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative integer and value of the second expression is a Unsigned32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned32, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Unsigned32, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type, unary-minus function init() { int startIndex = -10; @@ -3208,8 +3294,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed8 integer and value of the second expression is a positive integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, iterable-object, list-constructor-expr, - object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed8, isolated-method, iterable-object, list-constructor-expr, + object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int:Signed8 startIndex = 1; @@ -3235,8 +3321,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a negative integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, iterable-object, list-constructor-expr, - object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed8, isolated-method, iterable-object, list-constructor-expr, + object-type, object-type-inclusion, optional-type, range-expr, record-type, unary-minus function init() { int:Signed8 startIndex = -10; @@ -3262,8 +3348,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a positive integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, iterable-object, list-constructor-expr, - object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed8, isolated-method, iterable-object, list-constructor-expr, + object-type, object-type-inclusion, optional-type, range-expr, record-type, unary-minus function init() { int:Signed8 startIndex = -10; @@ -3289,8 +3375,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed8 integer and value of the second expression is a positive Signed16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed8, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, int:Signed8, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int:Signed8 startIndex = 1; @@ -3316,8 +3402,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a negative Signed16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed8, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, int:Signed8, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type, unary-minus function init() { int:Signed8 startIndex = -10; @@ -3343,8 +3429,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a positive Signed16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed8, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, int:Signed8, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type, unary-minus function init() { int:Signed8 startIndex = -10; @@ -3370,8 +3456,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed8 integer and value of the second expression is a positive Signed32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Signed8, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, int:Signed8, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int:Signed8 startIndex = 1; @@ -3398,8 +3484,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a negative Signed32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Signed8, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, int:Signed8, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type, unary-minus function init() { int:Signed8 startIndex = -10; @@ -3425,8 +3511,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a positive Signed32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Signed8, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, int:Signed8, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type, unary-minus function init() { int:Signed8 startIndex = -10; @@ -3452,8 +3538,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed8 integer and value of the second expression is a Unsigned8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, int:Unsigned8, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed8, int:Unsigned8, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int:Signed8 startIndex = 1; @@ -3480,8 +3566,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a Unsigned8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, int:Unsigned8, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed8, int:Unsigned8, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type, unary-minus function init() { int:Signed8 startIndex = -10; @@ -3507,8 +3593,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed8 integer and value of the second expression is a byte. -Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, int:Signed8, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, foreach-stmt, int, int:Signed8, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int:Signed8 startIndex = 1; @@ -3534,8 +3620,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a byte. -Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, int:Signed8, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, foreach-stmt, int, int:Signed8, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type, unary-minus function init() { int:Signed8 startIndex = -10; @@ -3561,8 +3647,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed8 integer and value of the second expression is a Unsigned16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, int:Unsigned16, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed8, int:Unsigned16, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int:Signed8 startIndex = 1; @@ -3588,8 +3674,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a Unsigned16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, int:Unsigned16, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed8, int:Unsigned16, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type, unary-minus function init() { int:Signed8 startIndex = -10; @@ -3615,8 +3701,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed8 integer and value of the second expression is a Unsigned32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, int:Unsigned32, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed8, int:Unsigned32, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int:Signed8 startIndex = 1; @@ -3642,8 +3728,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed8 integer and value of the second expression is a Unsigned32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, int:Unsigned32, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed8, int:Unsigned32, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type, unary-minus function init() { int:Signed8 startIndex = -10; @@ -3669,8 +3755,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed16 integer and value of the second expression is a positive integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, iterable-object, list-constructor-expr, - object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, isolated-method, iterable-object, list-constructor-expr, + object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int:Signed16 startIndex = 1; @@ -3696,8 +3782,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a negative integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, iterable-object, list-constructor-expr, - object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, isolated-method, iterable-object, list-constructor-expr, + object-type, object-type-inclusion, optional-type, range-expr, record-type, unary-minus function init() { int:Signed16 startIndex = -10; @@ -3723,8 +3809,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a positive integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, iterable-object, list-constructor-expr, - object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, isolated-method, iterable-object, list-constructor-expr, + object-type, object-type-inclusion, optional-type, range-expr, record-type, unary-minus function init() { int:Signed16 startIndex = -10; @@ -3750,8 +3836,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed16 integer and value of the second expression is a positive Signed8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed8, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, int:Signed8, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int:Signed16 startIndex = 1; @@ -3777,8 +3863,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a negative Signed8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed8, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, int:Signed8, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type, unary-minus function init() { int:Signed16 startIndex = -10; @@ -3804,8 +3890,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a positive Signed8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed8, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, int:Signed8, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type, unary-minus function init() { int:Signed16 startIndex = -10; @@ -3831,8 +3917,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed16 integer and value of the second expression is a positive Signed32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed32, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, int:Signed32, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int:Signed16 startIndex = 1; @@ -3858,8 +3944,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a negative Signed32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed32, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, int:Signed32, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type, unary-minus function init() { int:Signed16 startIndex = -10; @@ -3885,8 +3971,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a positive Signed32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed32, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, int:Signed32, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type, unary-minus function init() { int:Signed16 startIndex = -10; @@ -3912,8 +3998,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed16 integer and value of the second expression is a Unsigned8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Unsigned8, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, int:Unsigned8, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int:Signed16 startIndex = 1; @@ -3939,8 +4025,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a Unsigned8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Unsigned8, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, int:Unsigned8, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type, unary-minus function init() { int:Signed16 startIndex = -10; @@ -3966,8 +4052,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed16 integer and value of the second expression is a byte. -Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, int:Signed16, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, foreach-stmt, int, int:Signed16, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int:Signed16 startIndex = 1; @@ -3993,8 +4079,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a byte. -Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, int:Signed16, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, foreach-stmt, int, int:Signed16, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type, unary-minus function init() { int:Signed16 startIndex = -10; @@ -4020,8 +4106,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed16 integer and value of the second expression is a Unsigned16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Unsigned16, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, int:Unsigned16, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int:Signed16 startIndex = 1; @@ -4047,8 +4133,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a Unsigned16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Unsigned16, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, int:Unsigned16, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type, unary-minus function init() { int:Signed16 startIndex = -10; @@ -4074,8 +4160,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed16 integer and value of the second expression is a Unsigned32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Unsigned32, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, int:Unsigned32, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int:Signed16 startIndex = 1; @@ -4101,8 +4187,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed16 integer and value of the second expression is a Unsigned32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Unsigned32, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, int:Unsigned32, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type, unary-minus function init() { int:Signed16 startIndex = -10; @@ -4128,8 +4214,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed32 integer and value of the second expression is a positive integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, iterable-object, list-constructor-expr, - object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, isolated-method, iterable-object, list-constructor-expr, + object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int:Signed32 startIndex = 1; @@ -4155,8 +4241,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a negative integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, iterable-object, list-constructor-expr, - object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, isolated-method, iterable-object, list-constructor-expr, + object-type, object-type-inclusion, optional-type, range-expr, record-type, unary-minus function init() { int:Signed32 startIndex = -10; @@ -4182,8 +4268,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a positive integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, iterable-object, list-constructor-expr, - object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, isolated-method, iterable-object, list-constructor-expr, + object-type, object-type-inclusion, optional-type, range-expr, record-type, unary-minus function init() { int:Signed32 startIndex = -10; @@ -4209,8 +4295,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed32 integer and value of the second expression is a positive Signed8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Signed8, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, int:Signed8, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int:Signed32 startIndex = 1; @@ -4236,8 +4322,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a negative Signed8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Signed8, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, int:Signed8, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type, unary-minus function init() { int:Signed32 startIndex = -10; @@ -4263,8 +4349,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a positive Signed8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Signed8, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, int:Signed8, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type, unary-minus function init() { int:Signed32 startIndex = -10; @@ -4290,8 +4376,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed32 integer and value of the second expression is a positive Signed16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed32, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, int:Signed32, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int:Signed32 startIndex = 1; @@ -4317,8 +4403,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a negative Signed16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed32, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, int:Signed32, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type, unary-minus function init() { int:Signed32 startIndex = -10; @@ -4344,8 +4430,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a positive Signed16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Signed32, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, int:Signed32, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type, unary-minus function init() { int:Signed32 startIndex = -10; @@ -4371,8 +4457,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed32 integer and value of the second expression is a Unsigned8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Unsigned8, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, int:Unsigned8, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int:Signed32 startIndex = 1; @@ -4398,8 +4484,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a Unsigned8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Unsigned8, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, int:Unsigned8, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type, unary-minus function init() { int:Signed32 startIndex = -10; @@ -4425,8 +4511,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed32 integer and value of the second expression is a byte. -Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, int:Signed32, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, foreach-stmt, int, int:Signed32, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int:Signed32 startIndex = 1; @@ -4452,8 +4538,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a byte. -Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, int:Signed32, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, foreach-stmt, int, int:Signed32, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type, unary-minus function init() { int:Signed32 startIndex = -10; @@ -4479,8 +4565,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed32 integer and value of the second expression is a Unsigned16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Unsigned16, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, int:Unsigned16, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int:Signed32 startIndex = 1; @@ -4506,8 +4592,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a Unsigned16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Unsigned16, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, int:Unsigned16, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type, unary-minus function init() { int:Signed32 startIndex = -10; @@ -4533,8 +4619,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a positive Signed32 integer and value of the second expression is a Unsigned32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Unsigned32, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, int:Unsigned32, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int:Signed32 startIndex = 1; @@ -4560,8 +4646,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a negative Signed32 integer and value of the second expression is a Unsigned32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Unsigned32, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type, unary-minus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, int:Unsigned32, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type, unary-minus function init() { int:Signed32 startIndex = -10; @@ -4587,8 +4673,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned8 integer and value of the second expression is a positive integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned8, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Unsigned8, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int:Unsigned8 startIndex = 1; @@ -4614,8 +4700,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned8 integer and value of the second expression is a positive Signed8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, int:Unsigned8, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed8, int:Unsigned8, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int:Unsigned8 startIndex = 1; @@ -4642,8 +4728,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned8 integer and value of the second expression is a positive Signed16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Unsigned8, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, int:Unsigned8, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int:Unsigned8 startIndex = 1; @@ -4669,8 +4755,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned8 integer and value of the second expression is a positive Signed32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Unsigned8, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, int:Unsigned8, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int:Unsigned8 startIndex = 1; @@ -4696,8 +4782,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned8 integer and value of the second expression is a byte. -Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, int:Unsigned8, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, foreach-stmt, int, int:Unsigned8, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int:Unsigned8 startIndex = 1; @@ -4723,8 +4809,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned8 integer and value of the second expression is a Unsigned16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned16, int:Unsigned8, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Unsigned16, int:Unsigned8, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int:Unsigned8 startIndex = 1; @@ -4750,8 +4836,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned8 integer and value of the second expression is a Unsigned32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned32, int:Unsigned8, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Unsigned32, int:Unsigned8, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int:Unsigned8 startIndex = 1; @@ -4778,8 +4864,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned16 integer and value of the second expression is a positive integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned16, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Unsigned16, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int:Unsigned16 startIndex = 1; @@ -4805,8 +4891,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned16 integer and value of the second expression is a positive Signed8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, int:Unsigned16, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed8, int:Unsigned16, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int:Unsigned16 startIndex = 1; @@ -4832,8 +4918,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned16 integer and value of the second expression is a positive Signed16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Unsigned16, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, int:Unsigned16, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int:Unsigned16 startIndex = 1; @@ -4859,8 +4945,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned16 integer and value of the second expression is a positive Signed32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Unsigned16, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, int:Unsigned16, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int:Unsigned16 startIndex = 1; @@ -4886,8 +4972,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned16 integer and value of the second expression is a Unsigned8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned16, int:Unsigned8, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Unsigned16, int:Unsigned8, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int:Unsigned16 startIndex = 1; @@ -4914,8 +5000,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned16 integer and value of the second expression is a byte. -Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, int:Unsigned16, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, foreach-stmt, int, int:Unsigned16, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int:Unsigned16 startIndex = 1; @@ -4941,8 +5027,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned16 integer and value of the second expression is a Unsigned32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned16, int:Unsigned32, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Unsigned16, int:Unsigned32, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int:Unsigned16 startIndex = 1; @@ -4968,8 +5054,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned32 integer and value of the second expression is a positive integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned32, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Unsigned32, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int:Unsigned32 startIndex = 1; @@ -4995,8 +5081,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned32 integer and value of the second expression is a positive Signed8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, int:Unsigned32, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed8, int:Unsigned32, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int:Unsigned32 startIndex = 1; @@ -5022,8 +5108,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned32 integer and value of the second expression is a positive Signed16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed16, int:Unsigned32, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed16, int:Unsigned32, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int:Unsigned32 startIndex = 1; @@ -5049,8 +5135,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned32 integer and value of the second expression is a positive Signed32 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed32, int:Unsigned32, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed32, int:Unsigned32, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int:Unsigned32 startIndex = 1; @@ -5076,8 +5162,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned32 integer and value of the second expression is a Unsigned8 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned32, int:Unsigned8, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Unsigned32, int:Unsigned8, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int:Unsigned32 startIndex = 1; @@ -5103,8 +5189,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned32 integer and value of the second expression is a byte. -Labels: additive-expr, array-type, array:push, byte, DecimalNumber, int, int:Unsigned32, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, foreach-stmt, int, int:Unsigned32, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int:Unsigned32 startIndex = 1; @@ -5130,8 +5216,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when value of the first expression is a Unsigned32 integer and value of the second expression is a Unsigned16 integer. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Unsigned16, int:Unsigned32, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Unsigned16, int:Unsigned32, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int:Unsigned32 startIndex = 1; @@ -5157,8 +5243,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when values of both expressions are of user-defined subtypes of int. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-object, list-constructor-expr, - module-type-defn, object-type, optional-type, range-expr, record-type, singleton-type, union-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, isolated-method, iterable-object, list-constructor-expr, + module-type-defn, object-type, object-type-inclusion, optional-type, range-expr, record-type, singleton-type, union-type type Ints 1|10; @@ -5183,11 +5269,40 @@ function init() { io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } +Description: Test range expression (inclusive) with iterable object when values of both expressions are of singleton + types of int. +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, isolated-method, iterable-object, + list-constructor-expr, module-type-defn, object-type, object-type-inclusion, optional-type, range-expr, + record-type, singleton-type + +type TEN 10; + +function init() { + 1 startIndex = 1; + TEN endIndex = 10; + int count = 0; + int[] arr = []; + + object { + *object:Iterable; + public isolated function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = startIndex ... endIndex; + + foreach int i in range { + arr.push(i); + count = count + 1; + } + io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] +} + Test-Case: output Description: Test range expression (inclusive) with iterable object when values of both expressions are of union of int subtypes. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, int:Signed8, int:Unsigned32, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type, union-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, int:Signed8, int:Unsigned32, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type, union-type function init() { int:Signed8|int:Unsigned32 startIndex = 1; @@ -5213,8 +5328,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when the value of the first expression and the value of the second expression is equal. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-object, list-constructor-expr, object-type, - optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, isolated-method, iterable-object, list-constructor-expr, + object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int startIndex = 5; @@ -5240,8 +5355,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when the value of the first expression is less than the value of the second expression. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-object, list-constructor-expr, object-type, - optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, isolated-method, iterable-object, list-constructor-expr, + object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int startIndex = 5; @@ -5267,8 +5382,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when the types of the values of the expressions are inferred. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-object, list-constructor-expr, object-type, - optional-type, range-expr, record-type, var +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, isolated-method, iterable-object, list-constructor-expr, + object-type, object-type-inclusion, optional-type, range-expr, record-type, var function init() { var startIndex = 1; @@ -5294,8 +5409,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when the types of the values of the expressions and type of the range expression are inferred. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-object, list-constructor-expr, range-expr, - var +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, isolated-method, iterable-object, list-constructor-expr, + range-expr, var function init() { int startIndex = 1; @@ -5315,8 +5430,8 @@ function init() { Test-Case: output Description: Test range expression (inclusive) at module level. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-object, list-constructor-expr, object-type, - optional-type, range-expr, record-type, var +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, isolated-method, iterable-object, list-constructor-expr, + object-type, object-type-inclusion, optional-type, range-expr, record-type, var int startIndex = 1; int endIndex = 10; @@ -5341,9 +5456,9 @@ function init() { } Test-Case: output -Description: Test range expression (inclusive) at module level. -Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-object, list-constructor-expr, range-expr, - var +Description: Test range expression (inclusive) at module level with var. +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, isolated-method, iterable-object, + list-constructor-expr, range-expr, var int startIndex = 1; int endIndex = 10; @@ -5364,7 +5479,7 @@ function init() { Test-Case: output Description: Test iterable object returned by the range expression (inclusive). -Labels: array-type, array:push, DecimalNumber, int, list-constructor-expr, method-call-expr, object-type, optional-type, +Labels: array-type, array:push, DecimalNumber, foreach-stmt, int, list-constructor-expr, method-call-expr, object-type, range-expr, value:toBalString, var function init() { @@ -5393,10 +5508,34 @@ function init() { io:println(rec?.value.toBalString()); // @output () } +Test-Case: output +Description: Test int literals as expressions in range expression (inclusive). +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type + +function init() { + int count = 0; + int[] arr = []; + + object { + *object:Iterable; + public isolated function iterator() returns object { + public isolated function next() returns (record {|int value;|}?); + }; + } range = 1 ... 10; + + foreach int i in range { + arr.push(i); + count = count + 1; + } + io:println(count); // @output 10 + io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] +} + Test-Case: output Description: Test field and member access as expressions in range expression (inclusive). -Labels: additive-expr, array-type, array:push, DecimalNumber, field-access-expr, int, iterable-object, - list-constructor-expr, mapping-constructor-expr, member-access-expr, module-type-defn, object-type, +Labels: additive-expr, array-type, array:push, DecimalNumber, field-access-expr, foreach-stmt, int, isolated-method, iterable-object, + list-constructor-expr, mapping-constructor-expr, member-access-expr, module-type-defn, object-type, object-type-inclusion, optional-type, range-expr, record-type type Record record { @@ -5426,9 +5565,9 @@ function init() { Test-Case: output Description: Test function and method call as expressions in range expression (inclusive). -Labels: additive-expr, array-type, array:push, DecimalNumber, explicit-new-expr, function-call-expr, int, - iterable-object, list-constructor-expr, method-call-expr, module-class-defn, object-type, optional-type, - range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, explicit-new-expr, foreach-stmt, function-call-expr, int, + isolated-method, iterable-object, list-constructor-expr, method-call-expr, module-class-defn, object-type, + object-type-inclusion, optional-type, range-expr, record-type class Class { function getInt() returns int { @@ -5462,8 +5601,9 @@ function getInt() returns int { Test-Case: output Description: Test type cast expression as expressions in range expression (inclusive). -Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-object, list-constructor-expr, object-type, - optional-type, range-expr, record-type, type-cast-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type, + type-cast-expr function init() { int count = 0; @@ -5486,8 +5626,9 @@ function init() { Test-Case: output Description: Test unary expressions as expressions in range expression (inclusive). -Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-object, list-constructor-expr, object-type, - optional-type, range-expr, record-type, unary-complement, unary-minus, unary-plus +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type, + unary-complement, unary-minus, unary-plus function init() { int count = 0; @@ -5521,8 +5662,8 @@ function init() { Test-Case: output Description: Test additive expression as expressions in range expression (inclusive). -Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-object, list-constructor-expr, object-type, - optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int count = 0; @@ -5545,8 +5686,9 @@ function init() { Test-Case: output Description: Test multiplicative expressions as expressions in range expression (inclusive). -Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-object, list-constructor-expr, - multiplicative-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, isolated-method, iterable-object, + list-constructor-expr, multiplicative-expr, object-type, object-type-inclusion, optional-type, range-expr, + record-type function init() { int count = 0; @@ -5580,8 +5722,9 @@ function init() { Test-Case: output Description: Test binary bitwise expressions as expressions in range expression (inclusive). -Labels: additive-expr, array-type, array:push, binary-bitwise-expr, DecimalNumber, int, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, binary-bitwise-expr, DecimalNumber, foreach-stmt, int, isolated-method, + iterable-object, list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, + record-type function init() { int count = 0; @@ -5615,8 +5758,9 @@ function init() { Test-Case: output Description: Test checking expressions as expressions in range expression (inclusive). -Labels: additive-expr, array-type, array:push, check, checkpanic, DecimalNumber, error, int, iterable-object, - list-constructor-expr, object-type, optional-type, range-expr, record-type, union-type +Labels: additive-expr, array-type, array:push, check, checkpanic, DecimalNumber, error, foreach-stmt, int, isolated-method, + iterable-object, list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, + record-type, union-type function init() returns error? { int|error startIndex = 2; @@ -5641,8 +5785,8 @@ function init() returns error? { Test-Case: output Description: Test let expression as expressions in range expression (inclusive). -Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-object, let-expr, list-constructor-expr, - object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, isolated-method, iterable-object, + let-expr, list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int count = 0; @@ -5665,8 +5809,8 @@ function init() { Test-Case: output Description: Test shift expressions as expressions in range expression (inclusive). -Labels: additive-expr, array-type, array:push, DecimalNumber, int, iterable-object, list-constructor-expr, object-type, - optional-type, range-expr, record-type, shift-expr +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, isolated-method, iterable-object, + list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type, shift-expr function init() { int count = 0; @@ -5689,8 +5833,9 @@ function init() { Test-Case: output Description: Test conditional expressions as expressions in range expression (inclusive). -Labels: additive-expr, array-type, array:push, conditional-expr, DecimalNumber, error, int, iterable-object, - list-constructor-expr, nil-literal, object-type, optional-type, range-expr, record-type, union-type +Labels: additive-expr, array-type, array:push, conditional-expr, DecimalNumber, error, foreach-stmt, int, isolated-method, + iterable-object, list-constructor-expr, nil-literal, object-type, object-type-inclusion, optional-type, + range-expr, record-type, union-type function init() { int|error a = 10; @@ -5715,8 +5860,8 @@ function init() { Test-Case: output Description: Test lang.int constants as expressions in range expression (inclusive). -Labels: additive-expr, int, int:SIGNED8_MAX_VALUE, int:UNSIGNED8_MAX_VALUE, iterable-object, object-type, optional-type, - range-expr, record-type +Labels: additive-expr, foreach-stmt, int, int:SIGNED8_MAX_VALUE, int:UNSIGNED8_MAX_VALUE, isolated-method, iterable-object, + object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { int count = 0; @@ -5736,8 +5881,9 @@ function init() { Test-Case: output Description: Test isolatedness of range expression (inclusive). -Labels: additive-expr, array-type, array:push, DecimalNumber, function-call-expr, int, iterable-object, - list-constructor-expr, lock-stmt, object-type, optional-type, range-expr, record-type +Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, function-call-expr, int, isolated-method, + iterable-object, list-constructor-expr, lock-stmt, object-type, object-type-inclusion, optional-type, + range-expr, record-type isolated int j = 1; @@ -5765,8 +5911,8 @@ function getRange() returns object { Test-Case: output Description: Test isolatedness of the resultant object of the range expression (inclusive). -Labels: any, array-type, array:push, int, is-expr, list-constructor-expr, object-type, optional-type, range-expr, - record-type, type-cast-expr +Labels: any, array-type, array:push, int, is-expr, isolated-method, list-constructor-expr, object-type, + object-type-inclusion, optional-type, range-expr, record-type, type-cast-expr function init() { object { @@ -5781,8 +5927,8 @@ function init() { Test-Case: output Description: Test isolatedness of the iterator() and next() methods of range expression (inclusive). -Labels: array-type, array:push, DecimalNumber, int, is-expr, list-constructor-expr, method-call-expr, object-type, - optional-type, range-expr, record-type +Labels: array-type, array:push, DecimalNumber, int, is-expr, isolated-method, list-constructor-expr, method-call-expr, + object-type, optional-type, range-expr, record-type type IsolatedIterable isolated object { public isolated function iterator() returns isolated object { @@ -5811,7 +5957,7 @@ Test-Case: error Description: Test range expression (inclusive) when static type of either of the expression is not a subtype of int. Labels: DecimalFloatingPointNumber, int, range-expr, string -function init() { +function errorFunction() { _ = 1.0 ... 10; // @error ... not defined when static type of either of the expression is not a subtype of int _ = 1 ... 10.0; // @error ... not defined when static type of either of the expression is not a subtype of int _ = 1.0 ... 10.0; // @error ... not defined when static type of either of the expression is not a subtype of int @@ -5823,9 +5969,9 @@ function init() { Test-Case: error Description: Test assigning the result of range expression (inclusive) to an incompatible type. -Labels: DecimalNumber, int, object-type, optional-type, range-expr, record-type +Labels: DecimalNumber, int, isolated-method, object-type, optional-type, range-expr, record-type -function init() { +function errorFunction() { int _ = 1 ... 10; // @error expects an int, but the result of a range expression is an object object { @@ -5838,9 +5984,9 @@ function init() { Test-Case: error Description: Test assigning the result of range expression (inclusive) to an incompatible type when the static type of the range expression is inferred. -Labels: DecimalNumber, float, int, object-type, optional-type, range-expr, record-type, var +Labels: DecimalNumber, float, int, isolated-method, object-type, optional-type, range-expr, record-type, var -function init() { +function errorFunction() { var a = 1 ... 10; int _ = a; // @error expects an int, but the result of a range expression is an object @@ -5856,7 +6002,7 @@ Test-Case: parser-error Description: Test range expression (inclusive) syntax errors. Labels: DecimalNumber, range-expr -function init() { +function errorFunction() { _ = 1..10; // @error invalid operation // @error missing binary operator // @error missing identifier From 4583c3ce57c9a3bdb55ee100edd473dbd803ff7e Mon Sep 17 00:00:00 2001 From: lasinicl Date: Fri, 27 May 2022 13:56:40 +0530 Subject: [PATCH 10/14] Fix few issues in tests --- .../lang/expressions/range-expr/range_expr_exclusive.balt | 3 ++- .../lang/expressions/range-expr/range_expr_inclusive.balt | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/conformance/lang/expressions/range-expr/range_expr_exclusive.balt b/conformance/lang/expressions/range-expr/range_expr_exclusive.balt index f275aa00..26c4c140 100644 --- a/conformance/lang/expressions/range-expr/range_expr_exclusive.balt +++ b/conformance/lang/expressions/range-expr/range_expr_exclusive.balt @@ -5296,6 +5296,7 @@ function init() { io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } +Test-case: output Description: Test range expression (exclusive) with iterable object when values of both expressions are of singleton types of int. Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, isolated-method, iterable-object, @@ -5458,7 +5459,7 @@ Test-Case: output Description: Test range expression (exclusive) at module level. Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, isolated-method, iterable-object, list-constructor-expr, module-init-var-decl, object-type, object-type-inclusion, optional-type, range-expr, - record-type, var + record-type int startIndex = 1; int endIndex = 10; diff --git a/conformance/lang/expressions/range-expr/range_expr_inclusive.balt b/conformance/lang/expressions/range-expr/range_expr_inclusive.balt index 0c83c0cb..8e0873d9 100644 --- a/conformance/lang/expressions/range-expr/range_expr_inclusive.balt +++ b/conformance/lang/expressions/range-expr/range_expr_inclusive.balt @@ -5269,6 +5269,7 @@ function init() { io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } +Test-case: output Description: Test range expression (inclusive) with iterable object when values of both expressions are of singleton types of int. Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, isolated-method, iterable-object, @@ -5431,7 +5432,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) at module level. Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, isolated-method, iterable-object, list-constructor-expr, - object-type, object-type-inclusion, optional-type, range-expr, record-type, var + object-type, object-type-inclusion, optional-type, range-expr, record-type int startIndex = 1; int endIndex = 10; From d6846c934567e3138cfb6234570d8aa0623fc8b9 Mon Sep 17 00:00:00 2001 From: lasinicl Date: Mon, 30 May 2022 17:56:11 +0530 Subject: [PATCH 11/14] Fix tests --- conformance/lang/expressions/is-expr/is_expr.balt | 10 +++++----- .../lang/expressions/is-expr/negation_is_expr.balt | 12 ++++++------ .../multiplicative-expr/multiplicative_expr.balt | 8 ++------ .../expressions/range-expr/range_expr_exclusive.balt | 2 +- .../expressions/range-expr/range_expr_inclusive.balt | 10 +++++----- 5 files changed, 19 insertions(+), 23 deletions(-) diff --git a/conformance/lang/expressions/is-expr/is_expr.balt b/conformance/lang/expressions/is-expr/is_expr.balt index ccb0bc77..ca2bc10a 100644 --- a/conformance/lang/expressions/is-expr/is_expr.balt +++ b/conformance/lang/expressions/is-expr/is_expr.balt @@ -1453,7 +1453,7 @@ function init() { ]; io:println(i is any); // @output true - table> j = table key(a) [ + table> j = table [ {a: 1, b: error("E1")}, {a: 2, b: error("E2")} ]; @@ -1841,11 +1841,11 @@ function init() { io:println(d is int:Unsigned32); // @output true io:println(d is byte); // @output true - any e = table key(x) [{x: 1, y: [10.2, "A"]}]; - io:println(e is TableType); // @output true + any e = table [{x: 1, y: [10.2, "A"]}]; + io:println(e is TableType); // @output false io:println(e is table>); // @output false - io:println(e is table key); // @output true - io:println(e is anydata); // @output true + io:println(e is table key); // @output false + io:println(e is anydata); // @output false record {|readonly int x; [float, string] y;|} f = {x: 1, y: [10.2, "A"]}; io:println(f is Record); // @output true diff --git a/conformance/lang/expressions/is-expr/negation_is_expr.balt b/conformance/lang/expressions/is-expr/negation_is_expr.balt index 71d66a4f..db830396 100644 --- a/conformance/lang/expressions/is-expr/negation_is_expr.balt +++ b/conformance/lang/expressions/is-expr/negation_is_expr.balt @@ -1454,7 +1454,7 @@ function init() { ]; io:println(i !is any); // @output false - table> j = table key(a) [ + table> j = table [ {a: 1, b: error("E1")}, {a: 2, b: error("E2")} ]; @@ -1814,7 +1814,7 @@ type Record record {| [float, string] y; |}; -type TableType table key(x); +type TableType table; type Record2 record {| int|string x; @@ -1842,11 +1842,11 @@ function init() { io:println(d !is int:Unsigned32); // @output false io:println(d !is byte); // @output false - any e = table key(x) [{x: 1, y: [10.2, "A"]}]; - io:println(e !is TableType); // @output false + any e = table [{x: 1, y: [10.2, "A"]}]; + io:println(e !is TableType); // @output true io:println(e !is table>); // @output true - io:println(e !is table key); // @output false - io:println(e !is anydata); // @output false + io:println(e !is table); // @output true + io:println(e !is anydata); // @output true record {|readonly int x; [float, string] y;|} f = {x: 1, y: [10.2, "A"]}; io:println(f !is Record); // @output false diff --git a/conformance/lang/expressions/multiplicative-expr/multiplicative_expr.balt b/conformance/lang/expressions/multiplicative-expr/multiplicative_expr.balt index 54b6eabd..41d75fd6 100644 --- a/conformance/lang/expressions/multiplicative-expr/multiplicative_expr.balt +++ b/conformance/lang/expressions/multiplicative-expr/multiplicative_expr.balt @@ -69,14 +69,10 @@ type Ints 1|2; type Floats 2.0|3.0|4.0; type Decimals 1d|4.12d; -function errorFunction(int:Signed8 a, int:Signed16 b, int:Signed32 c, - int:Unsigned8 d, int:Unsigned16 e, int:Unsigned32 f, - byte g, Ints h, Floats i, Decimals j, - int:Unsigned8? k, Ints? l, Floats? m, Decimals? n) { +function errorFunction(int:Signed8 a, int:Signed32 c, int:Unsigned16 e, int:Unsigned32 f, byte g, + Ints h, Floats i, Decimals j, int:Unsigned8? k, Ints? l, Floats? m, Decimals? n) { int:Signed8 _ = a * i; // @error * is not allowed with operands of different basic types - decimal _ = j / b; // @error / is not allowed with operands of different basic types float _ = c % m; // @error % is not allowed with operands of different basic types - float _ = i * d; // @error * is not allowed with operands of different basic types int _ = e / j; // @error / is not allowed with operands of different basic types float _ = m % f; // @error % is not allowed with operands of different basic types int _ = g * n; // @error * is not allowed with operands of different basic types diff --git a/conformance/lang/expressions/range-expr/range_expr_exclusive.balt b/conformance/lang/expressions/range-expr/range_expr_exclusive.balt index 26c4c140..a53ad5c0 100644 --- a/conformance/lang/expressions/range-expr/range_expr_exclusive.balt +++ b/conformance/lang/expressions/range-expr/range_expr_exclusive.balt @@ -5296,7 +5296,7 @@ function init() { io:println(arr); // @output [1,2,3,4,5,6,7,8,9] } -Test-case: output +Test-Case: output Description: Test range expression (exclusive) with iterable object when values of both expressions are of singleton types of int. Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, isolated-method, iterable-object, diff --git a/conformance/lang/expressions/range-expr/range_expr_inclusive.balt b/conformance/lang/expressions/range-expr/range_expr_inclusive.balt index 8e0873d9..1eb50337 100644 --- a/conformance/lang/expressions/range-expr/range_expr_inclusive.balt +++ b/conformance/lang/expressions/range-expr/range_expr_inclusive.balt @@ -254,7 +254,7 @@ function init() { Test-Case: output Description: Test range expression (inclusive) when values of both expressions are bytes. -Labels: additive-expr, array-type, array:push, bytes, DecimalNumber, foreach-stmt, int, iterable-inclusive, +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, foreach-stmt, int, iterable-inclusive, list-constructor-expr, range-expr function init() { @@ -2754,12 +2754,12 @@ function init() { Test-Case: output Description: Test range expression (inclusive) with iterable object when values of both expressions are bytes. -Labels: additive-expr, array-type, array:push, bytes, DecimalNumber, foreach-stmt, int, isolated-method, iterable-object, +Labels: additive-expr, array-type, array:push, byte, DecimalNumber, foreach-stmt, int, isolated-method, iterable-object, list-constructor-expr, object-type, object-type-inclusion, optional-type, range-expr, record-type function init() { - bytes startIndex = 1; - bytes endIndex = 10; + byte startIndex = 1; + byte endIndex = 10; int count = 0; int[] arr = []; @@ -5269,7 +5269,7 @@ function init() { io:println(arr); // @output [1,2,3,4,5,6,7,8,9,10] } -Test-case: output +Test-Case: output Description: Test range expression (inclusive) with iterable object when values of both expressions are of singleton types of int. Labels: additive-expr, array-type, array:push, DecimalNumber, foreach-stmt, int, isolated-method, iterable-object, From fa5b4dc823b0b1ed0be3d6e5cd1a20a2e9e41f50 Mon Sep 17 00:00:00 2001 From: lasinicl Date: Mon, 30 May 2022 18:10:51 +0530 Subject: [PATCH 12/14] Add tests --- conformance/lang/expressions/is-expr/is_expr.balt | 7 +++++++ conformance/lang/expressions/is-expr/negation_is_expr.balt | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/conformance/lang/expressions/is-expr/is_expr.balt b/conformance/lang/expressions/is-expr/is_expr.balt index ca2bc10a..88481ae9 100644 --- a/conformance/lang/expressions/is-expr/is_expr.balt +++ b/conformance/lang/expressions/is-expr/is_expr.balt @@ -1847,6 +1847,13 @@ function init() { io:println(e is table key); // @output false io:println(e is anydata); // @output false + TableType e = table [{x: 1, y: [10.2, "A"]}]; + io:println(e is any); // @output true + io:println(e is table key); // @output true + io:println(e is table); // @output true + io:println(e is table); // @output true + io:println(e is anydata); // @output true + record {|readonly int x; [float, string] y;|} f = {x: 1, y: [10.2, "A"]}; io:println(f is Record); // @output true io:println(f is record {|int x;(float|string)[] y; |}); // @output true diff --git a/conformance/lang/expressions/is-expr/negation_is_expr.balt b/conformance/lang/expressions/is-expr/negation_is_expr.balt index db830396..0d3a219a 100644 --- a/conformance/lang/expressions/is-expr/negation_is_expr.balt +++ b/conformance/lang/expressions/is-expr/negation_is_expr.balt @@ -1848,6 +1848,13 @@ function init() { io:println(e !is table); // @output true io:println(e !is anydata); // @output true + TableType e = table [{x: 1, y: [10.2, "A"]}]; + io:println(e !is any); // @output false + io:println(e !is table key); // @output false + io:println(e !is table); // @output false + io:println(e !is table); // @output false + io:println(e !is anydata); // @output false + record {|readonly int x; [float, string] y;|} f = {x: 1, y: [10.2, "A"]}; io:println(f !is Record); // @output false io:println(f !is record {|int x;(float|string)[] y; |}); // @output false From 31fab84ee2525d06e3f5dbf9f43b26581ce50fca Mon Sep 17 00:00:00 2001 From: lasinicl Date: Mon, 30 May 2022 18:36:47 +0530 Subject: [PATCH 13/14] Fix tests --- conformance/lang/expressions/is-expr/is_expr.balt | 12 ++++++------ .../lang/expressions/is-expr/negation_is_expr.balt | 14 +++++++------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/conformance/lang/expressions/is-expr/is_expr.balt b/conformance/lang/expressions/is-expr/is_expr.balt index 88481ae9..641cc429 100644 --- a/conformance/lang/expressions/is-expr/is_expr.balt +++ b/conformance/lang/expressions/is-expr/is_expr.balt @@ -1847,12 +1847,12 @@ function init() { io:println(e is table key); // @output false io:println(e is anydata); // @output false - TableType e = table [{x: 1, y: [10.2, "A"]}]; - io:println(e is any); // @output true - io:println(e is table key); // @output true - io:println(e is table); // @output true - io:println(e is table); // @output true - io:println(e is anydata); // @output true + TableType h = table [{x: 1, y: [10.2, "A"]}]; + io:println(h is any); // @output true + io:println(h is table key); // @output true + io:println(h is table); // @output true + io:println(h is table); // @output true + io:println(h is anydata); // @output true record {|readonly int x; [float, string] y;|} f = {x: 1, y: [10.2, "A"]}; io:println(f is Record); // @output true diff --git a/conformance/lang/expressions/is-expr/negation_is_expr.balt b/conformance/lang/expressions/is-expr/negation_is_expr.balt index 0d3a219a..dfed7171 100644 --- a/conformance/lang/expressions/is-expr/negation_is_expr.balt +++ b/conformance/lang/expressions/is-expr/negation_is_expr.balt @@ -1814,7 +1814,7 @@ type Record record {| [float, string] y; |}; -type TableType table; +type TableType table key(x); type Record2 record {| int|string x; @@ -1848,12 +1848,12 @@ function init() { io:println(e !is table); // @output true io:println(e !is anydata); // @output true - TableType e = table [{x: 1, y: [10.2, "A"]}]; - io:println(e !is any); // @output false - io:println(e !is table key); // @output false - io:println(e !is table); // @output false - io:println(e !is table); // @output false - io:println(e !is anydata); // @output false + TableType h = table [{x: 1, y: [10.2, "A"]}]; + io:println(h !is any); // @output false + io:println(h !is table key); // @output false + io:println(h !is table); // @output false + io:println(h !is table); // @output false + io:println(h !is anydata); // @output false record {|readonly int x; [float, string] y;|} f = {x: 1, y: [10.2, "A"]}; io:println(f !is Record); // @output false From a4c1c05eb46f22aed187daa26143b08919d3d592 Mon Sep 17 00:00:00 2001 From: MaryamZi Date: Tue, 31 May 2022 16:37:14 +0530 Subject: [PATCH 14/14] Add Fail-Issues --- conformance/lang/expressions/table_constructor_expr.balt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/conformance/lang/expressions/table_constructor_expr.balt b/conformance/lang/expressions/table_constructor_expr.balt index da68de64..781a6005 100644 --- a/conformance/lang/expressions/table_constructor_expr.balt +++ b/conformance/lang/expressions/table_constructor_expr.balt @@ -243,6 +243,7 @@ function init() { Test-Case: error Description: Test incompatible members in table constructor expressions with no key-specifier, when there is a single applicable contextually-expected type. +Fail-Issue: ballerina-platform/ballerina-lang#33049 Labels: boolean-literal, mapping-constructor-expr, module-type-defn, record-type, string, table-constructor-expr, table-type @@ -261,6 +262,7 @@ function errorFunction() { Test-Case: error Description: Test incompatible members in table constructor expressions with no key-specifier, when the mapping constructor has variable-name, computed-name, and spread fields +Fail-Issue: ballerina-platform/ballerina-lang#33049 Labels: boolean-literal, computed-name-field, mapping-constructor-expr, module-type-defn, record-type, spread-field, string, table-constructor-expr, table-type @@ -947,6 +949,7 @@ function init() { Test-Case: error Description: Test incompatible members in table constructor expressions with a key-specifier, when there is a single applicable contextually-expected type. +Fail-Issue: ballerina-platform/ballerina-lang#33049 Labels: boolean-literal, mapping-constructor-expr, module-type-defn, record-type-readonly-field, string, table-constructor-expr, table-constructor-key-specifier, table-type