-
-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
convert: Don't panic when collection element type unification fails
Despite our best efforts to correctly unify element types during conversion, sometimes some inconsistent types slip through anyway and make the conversion panic. Although in the long run it would be better to fix these problems upstream, it's the responsibility of the caller of cty to not try to perform any invalid operations, and so here we make the convert package pre-verify that it's found a sensible result before trying to construct it, and thus it can return a proper error if not rather than panicking.
- Loading branch information
1 parent
080b168
commit 6736481
Showing
3 changed files
with
389 additions
and
26 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
Oops, something went wrong.