-
Notifications
You must be signed in to change notification settings - Fork 303
Open
Labels
compiler:coreIssues for @typespec/compilerIssues for @typespec/compilerdesign:neededA design request has been raised that needs a proposalA design request has been raised that needs a proposaltriaged:core
Milestone
Description
Clear and concise description of the problem
Problem as stated in #7124
Scenario: model foo has a property bar and one of 2 properties baz and fox.
Potential modelling (or any equivalent that would allow anonymous reference to baz_or_fox where the union properties are named but are directly placed in foo):
model foo {
bar: uint32;
...baz_or_fox;
}
union baz_or_fox {
baz: uint32;
fox: uint32;
}
Currently it throws "Cannot spread properties of non-model type.".
Checklist
- Follow our Code of Conduct
- Read the docs.
- Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
Metadata
Metadata
Assignees
Labels
compiler:coreIssues for @typespec/compilerIssues for @typespec/compilerdesign:neededA design request has been raised that needs a proposalA design request has been raised that needs a proposaltriaged:core