[build] Fix warning (#4177)
[mono-project.git] / mcs / tests / test-partial-34.cs
blob75cff9e5de96c394e54cbdb4b8ef2c9ff33cd3d9
1 using System;
2 using CustomAttributes;
4 partial class A
6 // Partial methods w/o attributes.
7 partial void PartialMethodWith_NoAttr_NoDefn(string s);
8 partial void PartialMethodWith_NoAttr_Decl(string s);
10 // Partial methods w/o a definition.
11 [AttributeA("ANoDef")]
12 partial void PartialMethodWith_AAttr_NoDefn(string s);
13 partial void PartialMethodWith_BAttr_NoDefn([AttributeB("BNoDef")]string s);
15 // Attributes only on declaration.
16 [AttributeA("ADecl")]
17 partial void PartialMethodWith_AAttr_Decl(string s);
18 partial void PartialMethodWith_BAttr_Decl([AttributeB("BDecl")]string s);
20 // Attributes only on definition.
21 partial void PartialMethodWith_AAttr_Defn(string s);
22 partial void PartialMethodWith_BAttr_Defn(string s);
24 // Different Attribute on definition.
25 [AttributeA("WithABAttr")]
26 partial void PartialMethodWith_ABAttr(string s);
27 partial void PartialMethodWith_BAAttr([AttributeB("WithBAAttr")]string s);
30 partial class A
32 // Partial methods w/o attributes.
33 partial void PartialMethodWith_NoAttr_Decl(string s) { }
35 // Attributes only on declaration.
36 partial void PartialMethodWith_AAttr_Decl(string s) { }
37 partial void PartialMethodWith_BAttr_Decl(string s) { }
39 // Attributes only on definition.
40 [AttributeA("ADefn")]
41 partial void PartialMethodWith_AAttr_Defn(string s) { }
42 partial void PartialMethodWith_BAttr_Defn([AttributeB("BDefn")]string s)
46 // Different Attribute on definition.
47 [AttributeB("ABAttr")]
48 partial void PartialMethodWith_ABAttr(string s) { }
49 partial void PartialMethodWith_BAAttr([AttributeA("BAAttr")]string s) { }
52 namespace CustomAttributes {
53 [AttributeUsage(AttributeTargets.All, AllowMultiple=true)]
54 public class AttributeA : Attribute {
55 public AttributeA(String a) {}
58 [AttributeUsage(AttributeTargets.All, AllowMultiple=true)]
59 public class AttributeB : Attribute {
60 public AttributeB(String a) {}
64 class X
66 public static void Main ()