-
Notifications
You must be signed in to change notification settings - Fork 755
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add type checker support for spread operator in list-constructor-expr
#35601
Add type checker support for spread operator in list-constructor-expr
#35601
Conversation
…rm/ballerina-lang into spead-opt-type-check � Conflicts: � compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/parser/BLangNodeBuilder.java
Codecov Report
@@ Coverage Diff @@
## spread-operator #35601 +/- ##
=====================================================
+ Coverage 74.25% 74.28% +0.02%
- Complexity 46721 46781 +60
=====================================================
Files 3145 3145
Lines 181591 181774 +183
Branches 23482 23527 +45
=====================================================
+ Hits 134845 135035 +190
+ Misses 38919 38917 -2
+ Partials 7827 7822 -5
Continue to review full report at Codecov.
|
77c4ac1
to
23d833e
Compare
5cc38b0
to
ffff679
Compare
...erina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/TypeChecker.java
Outdated
Show resolved
Hide resolved
...erina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/TypeChecker.java
Show resolved
Hide resolved
...erina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/TypeChecker.java
Outdated
Show resolved
Hide resolved
...erina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/TypeChecker.java
Outdated
Show resolved
Hide resolved
...erina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/TypeChecker.java
Show resolved
Hide resolved
...erina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/TypeChecker.java
Show resolved
Hide resolved
...rc/test/java/org/ballerinalang/test/expressions/listconstructor/ListConstructorExprTest.java
Show resolved
Hide resolved
@@ -61,10 +61,12 @@ public void diagnosticsTest() { | |||
"inferred for '[1, p]'", 38, 35); | |||
BAssertUtil.validateError(resultNegative, i++, "invalid list constructor expression: types cannot be " + | |||
"inferred for '[a, 4]'", 41, 23); | |||
BAssertUtil.validateError(resultNegative, i++, "tuple and expression size does not match", | |||
BAssertUtil.validateError(resultNegative, i++, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In cases like
type Rec record {
int a;
};
function foo() {
[Rec1, int] a = []; //this should not throw no filler value error AFIU.
}
There seems to be already this bug. The only difference is now we are getting this new error.
Created #35712
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Purpose
$subject.
Fixes subtask: Implement type checker changes of #35178
Fixes: #34990
Approach
N/A
Samples
N/A
Remarks
N/A
Check List