Skip to content

Latest commit

 

History

History
25 lines (20 loc) · 510 Bytes

File metadata and controls

25 lines (20 loc) · 510 Bytes

GA0013

Title

Only one type is explicitly permitted

Category

Design

Severity

Warning

Details

This warning is emitted when a type parameter's explicit type constraints only permit the usage of a single type. This is a result of not permitting any base type, not permitting any unbound generic type, and including OnlyPermitSpecifiedTypesAttribute.

Example

class C
<
    // GA0013 will appear here
    [PermittedTypes(typeof(int))]
    [OnlyPermitSpecifiedTypes]
    T
>
{ }