Skip to content

Instantly share code, notes, and snippets.

@sdboyer
Created May 26, 2022 23:32
Show Gist options
  • Save sdboyer/36a526ec011b5568f4ca6691a6b58790 to your computer and use it in GitHub Desktop.
Save sdboyer/36a526ec011b5568f4ca6691a6b58790 to your computer and use it in GitHub Desktop.
oh the weirdness of CUE list behavior
bottomKinded is TRUE:
[...string]
[...string] | *[]
*[] | [...string]
[string, ...string]
[...string]
[...int]
[...string] | *["foo"]
[...string]
bottomKinded is FALSE:
[]
[string]
["foo"]
["foo", "bar"]
["foo", 2]
[...string] | [...int]
[...string] | *[int]
[int]
argBottomKinded is TRUE:
[...string]
[...string] | *[]
*[] | [...string]
[string, ...string]
[...string]
[...int]
[...string] | *["foo"]
[...string]
argBottomKinded is FALSE:
[]
[string]
["foo"]
["foo", "bar"]
["foo", 2]
[...string] | [...int]
[...string] | *[int]
[int]
isOpen is TRUE:
[...string]
[...string] | *[]
*[] | [...string]
[string, ...string]
[...string]
[...int]
[...string] | *["foo"]
[...string]
isOpen is FALSE:
[]
[string]
["foo"]
["foo", "bar"]
["foo", 2]
[...string] | [...int]
[...string] | *[int]
[int]
divergentTypes is TRUE:
["foo", "bar"]
["foo", 2]
divergentTypes is FALSE:
[]
[...string]
[...string] | *[]
*[] | [...string]
[string, ...string]
[string]
["foo"]
[...string] | [...int]
[...string]
[...int]
[...string] | *["foo"]
[...string] | *[int]
[...string]
[int]
emptyDefault is TRUE:
[]
[...string]
[...string] | *[]
*[] | [...string]
[...string]
[...int]
[...string]
emptyDefault is FALSE:
[string, ...string]
[string]
["foo"]
["foo", "bar"]
["foo", 2]
[...string] | [...int]
[...string] | *["foo"]
[...string] | *[int]
[int]
differentDefault is TRUE:
[...string] | *[]
*[] | [...string]
[...string] | *["foo"]
differentDefault is FALSE:
[]
[...string]
[string, ...string]
[string]
["foo"]
["foo", "bar"]
["foo", 2]
[...string] | [...int]
[...string]
[...int]
[...string] | *[int]
[...string]
[int]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment