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

[Proposal]: Allow using alias directive to reference any kind of Type #8645

Open
CyrusNajmabadi opened this issue Nov 19, 2024 · 0 comments
Open
Assignees
Labels
Implemented Needs ECMA Spec This feature has been implemented in C#, but still needs to be merged into the ECMA specification Proposal champion
Milestone

Comments

@CyrusNajmabadi
Copy link
Member

Allow using alias directive to reference any kind of Type

Summary

Relax the using_alias_directive (§13.5.2) to allow it to point at any sort of type, not just named types. This would support types not allowed today, like: tuple types, pointer types, array types, etc. For example, this would now be allowed:

using Point = (int x, int y);

Design meetings

main/meetings/2021/LDM-2021-09-20.md#type-alias-improvements
main/meetings/2022/LDM-2022-08-31.md#using-aliases-for-any-type
main/meetings/2022/LDM-2022-09-28.md#ungrouped
main/meetings/2023/LDM-2023-01-11.md#using-aliases-for-any-types

@dotnet dotnet locked and limited conversation to collaborators Nov 19, 2024
@CyrusNajmabadi CyrusNajmabadi self-assigned this Nov 19, 2024
@CyrusNajmabadi CyrusNajmabadi added this to the 12.0 milestone Nov 19, 2024
@333fred 333fred added the Implemented Needs ECMA Spec This feature has been implemented in C#, but still needs to be merged into the ECMA specification label Jan 24, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Implemented Needs ECMA Spec This feature has been implemented in C#, but still needs to be merged into the ECMA specification Proposal champion
Projects
None yet
Development

No branches or pull requests

2 participants