]> git.immae.eu Git - github/fretlink/terraform-provider-statuscake.git/blobdiff - vendor/github.com/zclconf/go-cty/cty/json/type_implied.go
Upgrade to 0.12
[github/fretlink/terraform-provider-statuscake.git] / vendor / github.com / zclconf / go-cty / cty / json / type_implied.go
index 1a973066e4af54513c2f57bf98a15467e9a53f16..0fa13f6c53c6e549cce7d92cfa183f57c3f1997f 100644 (file)
@@ -138,7 +138,7 @@ func impliedObjectType(dec *json.Decoder) (cty.Type, error) {
 }
 
 func impliedTupleType(dec *json.Decoder) (cty.Type, error) {
-       // By the time we get in here, we've already consumed the { delimiter
+       // By the time we get in here, we've already consumed the [ delimiter
        // and so our next token should be the first value.
 
        var etys []cty.Type
@@ -150,10 +150,9 @@ func impliedTupleType(dec *json.Decoder) (cty.Type, error) {
                }
 
                if ttok, ok := tok.(json.Delim); ok {
-                       if rune(ttok) != ']' {
-                               return cty.NilType, fmt.Errorf("unexpected delimiter %q", ttok)
+                       if rune(ttok) == ']' {
+                               break
                        }
-                       break
                }
 
                ety, err := impliedTypeForTok(tok, dec)