Skip to content

Commit

Permalink
Fix merge
Browse files Browse the repository at this point in the history
An incompatibility between hashicorp#440 and hashicorp#438 was not caught until after
merging both to the main branch.
  • Loading branch information
alisdair committed Jan 6, 2021
1 parent 0cdbaf8 commit 6eb7705
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions hclsyntax/expression.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
// main set of marks
includeUnmarked, includeMarks := include.Unmark()
if marks == nil {
marks = includeMarks
} else {
for k := range includeMarks {
marks[k] = struct{}{}
}
}
marks = append(marks, includeMarks)
if includeUnmarked.False() {
// Skip this element
continue
Expand Down Expand Up @@ -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
// main set of marks
includeUnmarked, includeMarks := include.Unmark()
if marks == nil {
marks = includeMarks
} else {
for k := range includeMarks {
marks[k] = struct{}{}
}
}
marks = append(marks, includeMarks)
if includeUnmarked.False() {
// Skip this element
continue
Expand Down

0 comments on commit 6eb7705

Please sign in to comment.