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

[TCGC] Change behavior for union with null #725

Closed
tadelesh opened this issue Apr 23, 2024 · 1 comment · Fixed by #726
Closed

[TCGC] Change behavior for union with null #725

tadelesh opened this issue Apr 23, 2024 · 1 comment · Fixed by #726
Assignees
Labels
lib:tcgc Issues for @azure-tools/typespec-client-generator-core library needs-area

Comments

@tadelesh
Copy link
Member

Current behavior: we move null to property or parameter only when union with null and another type. iow, if a union with more than two types, we will not do that, which seems an inconsistency.
New behavior: whether union with two or more types, we will always move null type to property or parameter.

@tadelesh tadelesh self-assigned this Apr 23, 2024
@tadelesh tadelesh added the lib:tcgc Issues for @azure-tools/typespec-client-generator-core library label Apr 23, 2024
@tadelesh
Copy link
Member Author

oh, it seems i made a mistake. current behavior is good. just need to add some tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lib:tcgc Issues for @azure-tools/typespec-client-generator-core library needs-area
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant