AttributeUsage.AllowMultiple is not inherited for attributes defined (subclassed) in C# #17107
Labels
Area-Compiler-Checking
Type checking, attributes and all aspects of logic checking
Bug
Impact-Low
(Internal MS Team use only) Describes an issue with limited impact on existing code.
Milestone
Seems related to #9256.
C# attribute definitions:
This works fine in C#, i.e., the following compiles:
However, the following F# code does not:
This fails on the second
[<Child>]
line with FS0429:If
ChildAttribute
is defined in F# instead, it works.A simple, but of course suboptimal workaround is to subclass the desired (already subclassed) attribute and set the correct
AttributeUsage
on it.The text was updated successfully, but these errors were encountered: