-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Closed
Labels
Area-CompilersTestTest failures in roslyn-CITest failures in roslyn-CITest-GapDescribes a specific feature or scenario that does not have test coverageDescribes a specific feature or scenario that does not have test coverage
Milestone
Description
Championed issue
Latest LDM notes.
Specification
- Specification checked in to
csharplang(https://github.com/dotnet/csharplang/blob/main/proposals/csharp-11.0/generic-attributes.md)
Compiler
- LangVersion
- test GetAttributes and any other relevant compiler APIs
- test consuming a generic attribute from a C# 7 compiler
- netcoreapp2.1 programs can consume them just fine and even reflect on them even though certain APIs have bugs. Also, when an analyzer running with an old compiler encounters such attributes from metadata symbols, everything still works properly.
- AllowMultiple (original definition is considered, not construction)
- Ambiguity when both
MyAttribute<T>andMy<T>are present (bug Generic attributes don't properly resolve ambiguity with verbatim identifier #54772) - Inheriting from a generic attribute
- Parameters of type parameter types with various constructions (revealed bug Cannot read attribute arguments from metadata when the original definition parameter is of a type parameter type #55190)
- Properties of type parameter types with various constructions
- Update compiler test plan
- Type parameter constraints are checked
- Restricted types as type arguments (pointers, func pointers, TypedReference, ...)
- Abstract static interface constraints are checked
where T : INumeric<..>then argument isIIntegral - LookupSymbols should give substituted types as appropriate
- Generic attributes on lambdas / expression lambdas (?)
- Well-known attributes with additional type parameters are not recognized (
Obsolete<T>) - VB consuming generic attributes
- consuming generic attributes from F# (non-blocking)
- How do reflection APIs behave on generic attributes?
- In new .NET versions they "just work" however pre-netcoreapp3.1 has some bugs. Runtime team considers the recent changes for generic attributes to be bug-fix level so we don't expect to check the user's target runtime for support--same situation as parameterless struct constructors. Related: Enable generic attributes coreclr#9189
- adding runtime support (Enable generic attributes coreclr#9189)
- mono support or detection (issue Mono does not support querying for and open generic type when searching for Attributes runtime#56887)
- Assembly-level attributes Assemblies with generic attributes applied to their assembly cannot be referenced msbuild#6734
- Query for open generics in typeof
Attribute.GetCustomAttributes(typeof(Program), typeof(Attr<>)) - C++/CLI support (tracking issue)
Productivity
- verify typing, highlighting, formatting and completion behavior in IDE
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Area-CompilersTestTest failures in roslyn-CITest failures in roslyn-CITest-GapDescribes a specific feature or scenario that does not have test coverageDescribes a specific feature or scenario that does not have test coverage