Skip to content

AttributeUsage AllowMultiple and AttributeTargets is not inherited #9256

@NinoFloris

Description

@NinoFloris

AttributeUsage AllowMultiple is not inherited
HttpGet is failing, HttpMethod works (this mirrors the attributes from aspnet mvc)

open System

[<AttributeUsage(AttributeTargets.Class, AllowMultiple = true, Inherited = true)>]
type HttpMethodAttribute() = inherit Attribute()
type HttpGetAttribute() = inherit HttpMethodAttribute()

[<HttpGet; HttpGet>] // this shouldn't error like 
[<HttpMethod; HttpMethod>] // this doesn't
type C() =
    member _.M() = ()

https://sharplab.io/#v2:EYLgxg9gTgpgtADwGwBYA0AbEAzAzgHwgAcYA7AAgGUBPXAFxgFsBYAKDYG0AeAQTrqgBLYAFcGAVVwBDAOYwAFHwHCxMACpSocurgB0AYQxTcuNOR4YMEAO4BZERjqCiGGOQC85ASJhmAkqQAFjBCDAAmHl5QPgCUAHwAumx01CTkABL8RLYwdIEQYUpCogzyMZGCQSGCdOb8xaplyalumXREAOK5RSql5Z6VwaEZWTl5BT0lCjFsnFxtnbkA3CPtXXSJcwtj+WEr27m7m6wpafplHmzk1+SMTMAh5AD6urYXnmVAA=

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugImpact-Low(Internal MS Team use only) Describes an issue with limited impact on existing code.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions