From 6ba83af93dfb99265ed0421a98719c9ff6699c29 Mon Sep 17 00:00:00 2001 From: Tau <4602612+bash@users.noreply.github.com> Date: Tue, 7 Nov 2023 19:59:04 +0100 Subject: [PATCH] Use UnconditionalSuppressMessage SuppressMessage is removed by compiler, but warning is emitted by linker, so we have to use UnconditionalSuppressMessage instead. --- Funcky/UpCast.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Funcky/UpCast.cs b/Funcky/UpCast.cs index b78fd868..1e66e35f 100644 --- a/Funcky/UpCast.cs +++ b/Funcky/UpCast.cs @@ -43,7 +43,7 @@ public static Result From(Result result) /// result = UpCast.From(Lazy.Return("hello world")); /// ]]> - [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 From(Lazy lazy) where T : TResult => lazy.Select(From);