[Proposal]: Allow using alias directive to reference any kind of Type · Issue #8645 · dotnet/csharplang (original) (raw)
Allow using alias directive to reference any kind of Type
- Specification: https://github.com/dotnet/csharplang/blob/main/proposals/csharp-12.0/using-alias-types.md
- Discussion: Champion: using aliases for any types (VS 17.6, .NET 8) #8644
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