Fix merge
An incompatibility between #440 and #438 was not caught until after merging both to the main branch.
This commit is contained in:
parent
0cdbaf8bd0
commit
6eb7705df8
@ -1139,13 +1139,7 @@ func (e *ForExpr) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostics) {
|
|||||||
// Extract and merge marks from the include expression into the
|
// Extract and merge marks from the include expression into the
|
||||||
// main set of marks
|
// main set of marks
|
||||||
includeUnmarked, includeMarks := include.Unmark()
|
includeUnmarked, includeMarks := include.Unmark()
|
||||||
if marks == nil {
|
marks = append(marks, includeMarks)
|
||||||
marks = includeMarks
|
|
||||||
} else {
|
|
||||||
for k := range includeMarks {
|
|
||||||
marks[k] = struct{}{}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if includeUnmarked.False() {
|
if includeUnmarked.False() {
|
||||||
// Skip this element
|
// Skip this element
|
||||||
continue
|
continue
|
||||||
@ -1296,13 +1290,7 @@ func (e *ForExpr) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostics) {
|
|||||||
// Extract and merge marks from the include expression into the
|
// Extract and merge marks from the include expression into the
|
||||||
// main set of marks
|
// main set of marks
|
||||||
includeUnmarked, includeMarks := include.Unmark()
|
includeUnmarked, includeMarks := include.Unmark()
|
||||||
if marks == nil {
|
marks = append(marks, includeMarks)
|
||||||
marks = includeMarks
|
|
||||||
} else {
|
|
||||||
for k := range includeMarks {
|
|
||||||
marks[k] = struct{}{}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if includeUnmarked.False() {
|
if includeUnmarked.False() {
|
||||||
// Skip this element
|
// Skip this element
|
||||||
continue
|
continue
|
||||||
|
Loading…
Reference in New Issue
Block a user