blob: 75a4b4115721e2ae9e0f1abe05ec8c078fddfadf (
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
|
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
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);
}
}
}
|