Skip to content

Latest commit

 

History

History
25 lines (20 loc) · 443 Bytes

File metadata and controls

25 lines (20 loc) · 443 Bytes

GA0012

Title

Invalid usage of OnlyPermitSpecifiedTypesAttribute

Category

Validity

Severity

Error

Details

This error is emitted when a type parameter's explicit type constraints do not permit the usage of any type while including OnlyPermitSpecifiedTypesAttribute.

Example

class C
<
    [ProhibitedTypes(typeof(int), typeof(long))]
    // GA0012 will appear here
    [OnlyPermitSpecifiedTypes]
    T
>
{ }