forked from hashicorp/hcl
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hcldec: Fix DefaultSpec to allow attribute and block specs
Previously it was not implementing the two optional interfaces required for this, and so decoding would fail for any AttrSpec or block spec nested inside. Now it passes through attribute requirements from both the primary and default, and passes block requirements only from the primary, thus allowing either fallback between two attributes, fallback from an attribute to a constant, or fallback from a block to a constant. Other permutations are also possible, but not very important.
- Loading branch information
1 parent
9db880a
commit bbbd0ef
Showing
3 changed files
with
161 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters