30 references to AttributesNotAllowed
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (30)
Semantics\PrimaryConstructorTests.cs (30)
6845("1901", NotUsedWarning | AttributesNotAllowed | Shadows, "public System.Action F = () => { [Attr1(p1)] return; };"),
6846("1902", NotUsedWarning | AttributesNotAllowed | Shadows, "public System.Action P {get;} = () => { [Attr1(p1)] return; };"),
6847("1903", NotUsedWarning | AttributesNotAllowed | Shadows, "public event System.Action E = () => { [Attr1(p1)] return; };"),
6848("1904", NotUsedWarning | AttributesNotAllowed | Shadows, "public static System.Action F = () => { [Attr1(p1)] return; };"),
6849("1906", NotUsedWarning | AttributesNotAllowed | Shadows, "public static System.Action P {get;} = () => { [Attr1(p1)] return; };"),
6850("1907", NotUsedWarning | AttributesNotAllowed | Shadows, "public static event System.Action E = () => { [Attr1(p1)] return; };"),
6851("1908", NotUsedWarning | AttributesNotAllowed, "static C1() { [Attr1(p1)] return; }"),
6852("1909", NotUsedWarning | AttributesNotAllowed, "static void M() { [Attr1(p1)] return; }"),
6853("1911", NotUsedWarning | AttributesNotAllowed, "static int P { get { [Attr1(p1)] return 0; } }"),
6854("1912", NotUsedWarning | AttributesNotAllowed, "static int P { set { [Attr1(p1)] return; } }"),
6855("1913", NotUsedWarning | AttributesNotAllowed, "static int P { set {} get { [Attr1(p1)] return 0; } }"),
6856("1914", NotUsedWarning | AttributesNotAllowed, "static int P { get => 0; set { [Attr1(p1)] return; } }"),
6857("1915", NotUsedWarning | AttributesNotAllowed, "static event System.Action E { add { [Attr1(p1)] return; } remove {} }"),
6858("1916", NotUsedWarning | AttributesNotAllowed, "static event System.Action E { add {} remove { [Attr1(p1)] return; } }"),
6859("1917", NotUsedWarning | AttributesNotAllowed, "void M() { [Attr1(p1)] return; }"),
6860("1918", NotUsedWarning | AttributesNotAllowed, "int P { get { [Attr1(p1)] return 0; } }"),
6861("1919", NotUsedWarning | AttributesNotAllowed, "int P { set { [Attr1(p1)] return; } }"),
6862("1920", NotUsedWarning | AttributesNotAllowed, "int P { set {} get { [Attr1(p1)] return 0; } }"),
6863("1921", NotUsedWarning | AttributesNotAllowed, "int P { get => 0; set { [Attr1(p1)] return; } }"),
6864("1922", NotUsedWarning | AttributesNotAllowed, "event System.Action E { add { [Attr1(p1)] return; } remove {} }"),
6865("1923", NotUsedWarning | AttributesNotAllowed, "event System.Action E { add {} remove { [Attr1(p1)] return; } }"),
6866("1924", NotUsedWarning | AttributesNotAllowed, "int this[int x] { get { [Attr1(p1)] return 0; } }"),
6867("1925", NotUsedWarning | AttributesNotAllowed, "int this[int x] { set { [Attr1(p1)] return; } }"),
6868("1926", NotUsedWarning | AttributesNotAllowed, "int this[int x] { set {} get { [Attr1(p1)] return 0; } }"),
6869("1927", NotUsedWarning | AttributesNotAllowed, "int this[int x] { get => 0; set { [Attr1(p1)] return; } }"),
6870("1928", NotUsedWarning | AttributesNotAllowed, "~C1() { [Attr1(p1)] return; }"),
6871("1929", NotUsedWarning | AttributesNotAllowed, "public C1() : this(() => { [Attr1(p1)] return; }) {} C1(System.Action x) : this(0) {}"),
6872("1930", NotUsedWarning | AttributesNotAllowed, "public C1() : this(0) { [Attr1(p1)] return; }"),
6873("1935", NotUsedWarning | AttributesNotAllowed, "class Nested() : NestedBase(() => { [Attr1(p1)] return; }) {} class NestedBase(System.Action x) { object F = x; } "),
7398if ((flags & TestFlags.AttributesNotAllowed) != 0)