feat: adding Covariance for Switch
All checks were successful
Build and Test with Maven / Build-and-test-with-Maven (push) Successful in 4m37s
All checks were successful
Build and Test with Maven / Build-and-test-with-Maven (push) Successful in 4m37s
This commit is contained in:
parent
eb454aa5b2
commit
daa38183fa
@ -822,6 +822,10 @@ public class TYPEStmt implements StatementVisitor {
|
||||
public void visit(Switch switchStmt) {
|
||||
switchStack.push(switchStmt);
|
||||
|
||||
if(switchStmt.getSwitch().getType() instanceof TypePlaceholder){
|
||||
((TypePlaceholder) switchStmt.getSwitch().getType()).setVariance(1);
|
||||
}
|
||||
|
||||
RefTypeOrTPHOrWildcardOrGeneric caseExpressionType = null;
|
||||
for (var child : switchStmt.getBlocks()) {
|
||||
for (var label : child.getLabels()) {
|
||||
|
Loading…
Reference in New Issue
Block a user