Update selects_test for selects with deferred expressions

Bug: 323382414
Test: m nothing --no-skip-soong-tests
Change-Id: I18257ff586fb31d4e0b012a249726a925832cdac
This commit is contained in:
Cole Faust
2024-06-17 15:03:33 -07:00
parent 38a97b2c47
commit ba48366969
9 changed files with 157 additions and 27 deletions

View File

@@ -341,9 +341,6 @@ func classifyLocalOrGlobalPath(value bpparser.Expression) (string, bpparser.Expr
firstOperand := v.Args[0]
secondOperand := v.Args[1]
if firstOperand.Type() != bpparser.StringType {
return "global", value, nil
}
if _, ok := firstOperand.(*bpparser.Operator); ok {
return "global", value, nil

View File

@@ -493,7 +493,6 @@ func setVariable(file *bpFile, plusequals bool, prefix, name string, value bppar
Name: name,
NamePos: pos,
Value: value,
OrigValue: value,
EqualsPos: pos,
Assigner: "+=",
}
@@ -506,7 +505,6 @@ func setVariable(file *bpFile, plusequals bool, prefix, name string, value bppar
Name: name,
NamePos: pos,
Value: value,
OrigValue: value,
EqualsPos: pos,
Assigner: "=",
}

View File

@@ -81,7 +81,7 @@ func makeToStringExpression(ms *mkparser.MakeString, file *bpFile) (bpparser.Exp
}
tmp := &bpparser.Variable{
Name: name,
Value: &bpparser.String{},
Type_: bpparser.StringType,
}
if tmp.Name == "TOP" {
@@ -150,7 +150,7 @@ func makeToListExpression(ms *mkparser.MakeString, file *bpFile) (bpparser.Expre
}
listOfListValues = append(listOfListValues, &bpparser.Variable{
Name: name,
Value: &bpparser.List{},
Type_: bpparser.ListType,
})
listValue = &bpparser.List{}
}
@@ -215,7 +215,7 @@ func makeToBoolExpression(ms *mkparser.MakeString, file *bpFile) (bpparser.Expre
}
return &bpparser.Variable{
Name: name,
Value: &bpparser.Bool{},
Type_: bpparser.BoolType,
}, nil
} else {
return nil, fmt.Errorf("non-const bool expression %s", ms.Dump())