Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error out when attempting to generate a default for a disjunction with multiple defaults #15

Open
sdboyer opened this issue Aug 17, 2021 · 1 comment
Assignees
Labels

Comments

@sdboyer
Copy link
Contributor

sdboyer commented Aug 17, 2021

CUE itself falls back to bottom when there's a disjunction with multiple defaults on it. cuetsy should preserve these semantics, erroring out when it is requested that it generate a default const for an object that contains multiple default values.

@sdboyer sdboyer added kind/feature New feature or request component/generator labels Aug 17, 2021
@ying-jeanne ying-jeanne reopened this Aug 26, 2021
@ying-jeanne ying-jeanne added this to the 8.2.0 milestone Aug 30, 2021
@ying-jeanne ying-jeanne self-assigned this Aug 30, 2021
@ying-jeanne
Copy link
Collaborator

the current behaviour when testing:

-- cue --
E3: "a" | *"b" | *"c" @cuetsy(kind="enum")

-- err --
export enum E3 {
  A = 'a',
  B = 'b',
  C = 'c',
}
export const e3Default: E3 = E3.B' | 'C

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants