Semantics\PrimaryConstructorTests.cs (55)
7139("0001", Success | Shadows, "public int F = p1;"),
7140("0002", Success | Shadows, "public int P {get;} = p1;"),
7141("0003", Success | Shadows, "public event System.Action E = () => p1.ToString();"),
7142("0004", BadReference | NotUsedWarning | Shadows, "public static int F = p1;"),
7143("0005", BadReference | NotUsedWarning | Shadows | BadConstant, "public const int F = p1;"),
7144("0006", BadReference | NotUsedWarning | Shadows, "public static int P {get;} = p1;"),
7145("0007", BadReference | NotUsedWarning | Shadows, "public static event System.Action E = () => p1.ToString();"),
7374("1401", Success | Shadows, "public System.Func<int> F = (() => p1);"),
7375("1402", Success | Shadows, "public System.Func<System.Func<int>> F = (() => (System.Func<int>)(() => p1));"),
7376("1403", Success | Shadows, "public System.Func<int> F = () => { return local(); int local() => p1; };"),
7377("1404", Success | Shadows, "public System.Func<int> P {get;} = (() => p1);"),
7378("1405", Success | Shadows, "public System.Func<System.Func<int>> P {get;} = (() => (System.Func<int>)(() => p1));"),
7379("1406", Success | Shadows, "public System.Func<int> P {get;} = () => { return local(); int local() => p1; };"),
7380("1407", Success | Shadows, "public event System.Func<System.Func<int>> E = (() => (System.Func<int>)(() => p1));"),
7381("1408", Success | Shadows, "public event System.Func<int> E = () => { return local(); int local() => p1; };"),
7471("1901", NotUsedWarning | AttributesNotAllowed | Shadows, "public System.Action F = () => { [Attr1(p1)] return; };"),
7472("1902", NotUsedWarning | AttributesNotAllowed | Shadows, "public System.Action P {get;} = () => { [Attr1(p1)] return; };"),
7473("1903", NotUsedWarning | AttributesNotAllowed | Shadows, "public event System.Action E = () => { [Attr1(p1)] return; };"),
7474("1904", NotUsedWarning | AttributesNotAllowed | Shadows, "public static System.Action F = () => { [Attr1(p1)] return; };"),
7475("1906", NotUsedWarning | AttributesNotAllowed | Shadows, "public static System.Action P {get;} = () => { [Attr1(p1)] return; };"),
7476("1907", NotUsedWarning | AttributesNotAllowed | Shadows, "public static event System.Action E = () => { [Attr1(p1)] return; };"),
7501("2001", BadReference | NotUsedWarning | BadAttributeValue | Shadows, "public System.Action F = () => { [Attr1(p1)] void local(){} local(); };"),
7502("2002", BadReference | NotUsedWarning | BadAttributeValue | Shadows, "public System.Action P {get;} = () => { [Attr1(p1)] void local(){} local(); };"),
7503("2003", BadReference | NotUsedWarning | BadAttributeValue | Shadows, "public event System.Action E = () => { [Attr1(p1)] void local(){} local(); };"),
7504("2004", BadReference | NotUsedWarning | BadAttributeValue | Shadows, "public static System.Action F = () => { [Attr1(p1)] void local(){} local(); };"),
7505("2006", BadReference | NotUsedWarning | BadAttributeValue | Shadows, "public static System.Action P {get;} = () => { [Attr1(p1)] void local(){} local(); };"),
7506("2007", BadReference | NotUsedWarning | BadAttributeValue | Shadows, "public static event System.Action E = () => { [Attr1(p1)] void local(){} local(); };"),
7532("2101", Success | Shadows, "public System.Action F = () => { [Attr1(nameof(p1))] void local(){} local(); };"),
7533("2102", Success | Shadows, "public System.Action P {get;} = () => { [Attr1(nameof(p1))] void local(){} local(); };"),
7534("2103", Success | Shadows, "public event System.Action E = () => { [Attr1(nameof(p1))] void local(){} local(); };"),
7535("2104", NotUsedWarning | Shadows, "public static System.Action F = () => { [Attr1(nameof(p1))] void local(){} local(); };"),
7536("2106", NotUsedWarning | Shadows, "public static System.Action P {get;} = () => { [Attr1(nameof(p1))] void local(){} local(); };"),
7537("2107", NotUsedWarning | Shadows, "public static event System.Action E = () => { [Attr1(nameof(p1))] void local(){} local(); };"),
7563("2201", BadReference | BadDefaultValue | Shadows, "public System.Action F = () => { void local(int x = p1){} local(); };"),
7564("2202", BadReference | BadDefaultValue | Shadows, "public System.Action P {get;} = () => { void local(int x = p1){} local(); };"),
7565("2203", BadReference | BadDefaultValue | Shadows, "public event System.Action E = () => { void local(int x = p1){} local(); };"),
7566("2204", BadReference | NotUsedWarning | BadDefaultValue | Shadows, "public static System.Action F = () => { void local(int x = p1){} local(); };"),
7567("2206", BadReference | NotUsedWarning | BadDefaultValue | Shadows, "public static System.Action P {get;} = () => { void local(int x = p1){} local(); };"),
7568("2207", BadReference | NotUsedWarning | BadDefaultValue | Shadows, "public static event System.Action E = () => { void local(int x = p1){} local(); };"),
7594("2301", Success | Shadows, "public System.Action F = () => { void local(string x = nameof(p1)){} local(); };"),
7595("2302", Success | Shadows, "public System.Action P {get;} = () => { void local(string x = nameof(p1)){} local(); };"),
7596("2303", Success | Shadows, "public event System.Action E = () => { void local(string x = nameof(p1)){} local(); };"),
7597("2304", NotUsedWarning | Shadows, "public static System.Action F = () => { void local(string x = nameof(p1)){} local(); };"),
7598("2306", NotUsedWarning | Shadows, "public static System.Action P {get;} = () => { void local(string x = nameof(p1)){} local(); };"),
7599("2307", NotUsedWarning | Shadows, "public static event System.Action E = () => { void local(string x = nameof(p1)){} local(); };"),
7625("2401", Success | Shadows, "public int F = nameof(p1).Length;"),
7626("2402", Success | Shadows, "public int P {get;} = nameof(p1).Length;"),
7627("2403", Success | Shadows, "public event System.Action E = () => nameof(p1).Length.ToString();"),
7628("2404", NotUsedWarning | Shadows, "public static int F = nameof(p1).Length;"),
7629("2405", NotUsedWarning | Shadows, "public const string F = nameof(p1);"),
7630("2406", NotUsedWarning | Shadows, "public static int P {get;} = nameof(p1).Length;"),
7631("2407", NotUsedWarning | Shadows, "public static event System.Action E = () => nameof(p1).Length.ToString();"),
7821if (shadow && (flags & TestFlags.Shadows) == 0)
7864if (!shadow || (flags & TestFlags.Shadows) != 0)
8144("0002", NotUsedWarning | Shadows, "[Attr1(nameof(p1))]"),