json: mark properties as used after blocks are decoded from them

This commit is contained in:
Martin Atkins 2017-05-21 11:03:47 -07:00
parent 64c1036f80
commit 5fa767a43a

View File

@ -112,6 +112,7 @@ func (b *body) PartialContent(schema *zcl.BodySchema) (*zcl.BodyContent, zcl.Bod
}
v := jsonAttr.Value
diags = append(diags, b.unpackBlock(v, blockS.Type, &jsonAttr.NameRange, blockS.LabelNames, nil, nil, &content.Blocks)...)
usedNames[blockS.Type] = struct{}{}
}
unusedBody := &body{