blob: c680d1fdb9676d7ce91efc7e91da4232ad920df9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Mono.Linker.Tests.Cases.Expectations.Assertions;
using Mono.Linker.Tests.Cases.Expectations.Metadata;
// A module level suppression with a 'type' or 'member' scope must also specify the target, pointing
// to the type or member where the suppression should be put.
[module: UnconditionalSuppressMessage ("Test", "IL2026", Scope = "member", Target = null)]
namespace Mono.Linker.Tests.Cases.Warnings.WarningSuppression
{
[SkipKeptItemsValidation]
[LogContains ("IL2026")]
class ModuleSuppressionWithMemberScopeNullTarget
{
static void Main ()
{
TriggerWarning ();
}
[RequiresUnreferencedCode ("TriggerWarning")]
public static Type TriggerWarning ()
{
return typeof (ModuleSuppressionWithMemberScopeNullTarget);
}
}
}
|