Skip to content

Commit

Permalink
Use UnconditionalSuppressMessage
Browse files Browse the repository at this point in the history
SuppressMessage is removed by compiler, but warning is emitted by
linker, so we have to use UnconditionalSuppressMessage instead.
  • Loading branch information
bash committed Nov 7, 2023
1 parent 74238cc commit 6ba83af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Funcky/UpCast.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public static Result<TResult> From<TValidResult>(Result<TValidResult> result)
/// <code><![CDATA[
/// Lazy<object> result = UpCast<object>.From(Lazy.Return("hello world"));
/// ]]></code></example>
[SuppressMessage("", "IL2091: DynamicallyAccessedMembersMismatchTypeArgumentTargetsGenericParameter", Justification = "Public parameterless constructor is only used when a Lazy is created without providing a value or func.")]
[UnconditionalSuppressMessage("Trimming", "IL2091", Justification = "Public parameterless constructor is only used when a Lazy is created without providing a value or func.")]
public static Lazy<TResult> From<T>(Lazy<T> lazy)
where T : TResult
=> lazy.Select(From);
Expand Down

0 comments on commit 6ba83af

Please sign in to comment.