Skip to content

the DoesNotReturnAttribute should be enabled for NETCOREAPP3_0_OR_GREATER #10

@TymurGubayev

Description

@TymurGubayev

Currently, the generated code has the following method.

#if NETSTANDARD2_1_OR_GREATER
        [DoesNotReturn]
#endif
        private static TV ThrowInvalidCastException<TV>() => throw new InvalidCastException();

When targeting f.e. .NET7 the attribute is disabled. It'd be nice to have it enabled when NETCOREAPP3_0_OR_GREATER is set.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions