-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Incorrect behavior for constant #57770
Copy link
Copy link
Open
Labels
CodeGenIssues that relate to code generationIssues that relate to code generationMgmtThis issue is related to a management package.This issue is related to a management package.
Description
TypeSpec:
enum Colors {
green,
}
/** Employee properties */
model EmployeeProperties {
/** the favorite color */
@Azure.ClientGenerator.Core.alternateType("green")
favoriteColor: Colors;
}
Refer this playground.
Expected: csharp emitter should generate a struct named Colors but now it is generated as enum, with value "green", type of favoriteColor is Colors.
Actual: type of favoriteColor is constant "green"
Reactions are currently unavailable
Metadata
Metadata
Labels
CodeGenIssues that relate to code generationIssues that relate to code generationMgmtThis issue is related to a management package.This issue is related to a management package.