-
-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
json: Refuse to encode cty.DynamicVal
Two different bugs interacted here to cause a cty.DynamicVal to end up encoding as nothing at all, with no error: - The main marshal function was checking for dynamic type before checking for unknown value, so cty.DynamicVal was being passed to marshalDynamic. - marshalDynamic was not checking the error result from encoding the value, and so was successfully returning nothing at all. This situation will now return the same "value is not known" error that the function previously returned for all other situations where the given value is unknown. The JSON representation of cty values can only represent fully-known values.
- Loading branch information
1 parent
4b76b75
commit 4a34c33
Showing
2 changed files
with
8 additions
and
5 deletions.
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