99 references to BadAttributeValue
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (99)
Semantics\PrimaryConstructorTests.cs (99)
7329("0301", BadReference | NotUsedWarning | BadAttributeValue, "[Attr1(p1)] public int F = 0;"), 7330("0302", BadReference | NotUsedWarning | BadAttributeValue, "[Attr1(p1)] public int P {get;} = 0;"), 7331("0303", BadReference | NotUsedWarning | BadAttributeValue, "[Attr1(p1)] public event System.Action E = () => 0.ToString();"), 7332("0304", BadReference | NotUsedWarning | BadAttributeValue, "[Attr1(p1)] public static int F = 0;"), 7333("0305", BadReference | NotUsedWarning | BadAttributeValue, "[Attr1(p1)] public const int F = 0;"), 7334("0306", BadReference | NotUsedWarning | BadAttributeValue, "[Attr1(p1)] public static int P {get;} = 0;"), 7335("0307", BadReference | NotUsedWarning | BadAttributeValue, "[Attr1(p1)] public static event System.Action E = () => 0.ToString();"), 7336("0308", BadReference | NotUsedWarning | BadAttributeValue, "[Attr1(p1)] static C1() {}"), 7337("0309", BadReference | NotUsedWarning | BadAttributeValue, "[Attr1(p1)] static void M() {}"), 7338("0311", BadReference | NotUsedWarning | BadAttributeValue, "[Attr1(p1)] static int P { get { return 0; } }"), 7339("0312", BadReference | NotUsedWarning | BadAttributeValue, "[Attr1(p1)] static int P { set {} }"), 7340("0313", BadReference | NotUsedWarning | BadAttributeValue, "[Attr1(p1)] static int P { set {} get { return 0; } }"), 7341("0314", BadReference | NotUsedWarning | BadAttributeValue, "[Attr1(p1)] static int P { get => 0; set {} }"), 7342("0315", BadReference | NotUsedWarning | BadAttributeValue, "[Attr1(p1)] static event System.Action E { add {} remove {} }"), 7343("0316", BadReference | NotUsedWarning | BadAttributeValue, "[Attr1(p1)] static event System.Action E { add {} remove {} }"), 7344("0317", BadReference | NotUsedWarning | BadAttributeValue, "[Attr1(p1)] void M() {}"), 7345("0318", BadReference | NotUsedWarning | BadAttributeValue, "[Attr1(p1)] int P { get { return 0; } }"), 7346("0319", BadReference | NotUsedWarning | BadAttributeValue, "[Attr1(p1)] int P { set {} }"), 7347("0320", BadReference | NotUsedWarning | BadAttributeValue, "[Attr1(p1)] int P { set {} get { return 0; } }"), 7348("0321", BadReference | NotUsedWarning | BadAttributeValue, "[Attr1(p1)] int P { get => 0; set {} }"), 7349("0322", BadReference | NotUsedWarning | BadAttributeValue, "[Attr1(p1)] event System.Action E { add {} remove {} }"), 7350("0323", BadReference | NotUsedWarning | BadAttributeValue, "[Attr1(p1)] event System.Action E { add {} remove {} }"), 7351("0324", BadReference | NotUsedWarning | BadAttributeValue, "[Attr1(p1)] int this[int x] { get { return 0; } }"), 7352("0325", BadReference | NotUsedWarning | BadAttributeValue, "[Attr1(p1)] int this[int x] { set {} }"), 7353("0326", BadReference | NotUsedWarning | BadAttributeValue, "[Attr1(p1)] int this[int x] { set {} get { return 0; } }"), 7354("0327", BadReference | NotUsedWarning | BadAttributeValue, "[Attr1(p1)] int this[int x] { get => 0; set {} }"), 7355("0328", BadReference | NotUsedWarning | BadAttributeValue, "[Attr1(p1)] ~C1() {}"), 7356("0329", BadReference | NotUsedWarning | BadAttributeValue, "[Attr1(p1)] public C1() : this(0) {}"), 7357("0330", BadReference | NotUsedWarning | BadAttributeValue, "static int P { [Attr1(p1)] get { return 0; } }"), 7358("0331", BadReference | NotUsedWarning | BadAttributeValue, "static int P { [Attr1(p1)] set {} }"), 7359("0332", BadReference | NotUsedWarning | BadAttributeValue, "static event System.Action E { [Attr1(p1)] add {} remove {} }"), 7360("0333", BadReference | NotUsedWarning | BadAttributeValue, "static event System.Action E { add {} [Attr1(p1)] remove {} }"), 7361("0334", BadReference | NotUsedWarning | BadAttributeValue, "[Attr1(p1)] class Nested {}"), 7362("0335", BadReference | NotUsedWarning | BadAttributeValue, "class Nested([Attr1(p1)] int p2) { public int F = p2; }"), 7365("0401", BadReference | NotUsedWarning | BadAttributeValue, "class Nested { [Attr1(p1)] public int F = 0; }"), 7366("0402", BadReference | NotUsedWarning | BadAttributeValue, "class Nested { [Attr1(p1)] public int P {get;} = 0; }"), 7367("0403", BadReference | NotUsedWarning | BadAttributeValue, "class Nested { [Attr1(p1)] public event System.Action E = () => 0.ToString(); }"), 7368("0404", BadReference | NotUsedWarning | BadAttributeValue, "class Nested { [Attr1(p1)] public static int F = 0; }"), 7369("0406", BadReference | NotUsedWarning | BadAttributeValue, "class Nested { [Attr1(p1)] public static int P {get;} = 0; }"), 7370("0407", BadReference | NotUsedWarning | BadAttributeValue, "class Nested { [Attr1(p1)] public static event System.Action E = () => 0.ToString(); }"), 7371("0408", BadReference | NotUsedWarning | BadAttributeValue, "class Nested { [Attr1(p1)] static Nested() {} }"), 7372("0409", BadReference | NotUsedWarning | BadAttributeValue, "class Nested { [Attr1(p1)] static void M() {} }"), 7373("0411", BadReference | NotUsedWarning | BadAttributeValue, "class Nested { [Attr1(p1)] static int P { get { return 0; } } }"), 7374("0412", BadReference | NotUsedWarning | BadAttributeValue, "class Nested { [Attr1(p1)] static int P { set {} } }"), 7375("0413", BadReference | NotUsedWarning | BadAttributeValue, "class Nested { [Attr1(p1)] static int P { set {} get { return 0; } } }"), 7376("0414", BadReference | NotUsedWarning | BadAttributeValue, "class Nested { [Attr1(p1)] static int P { get => 0; set {} } }"), 7377("0415", BadReference | NotUsedWarning | BadAttributeValue, "class Nested { [Attr1(p1)] static event System.Action E { add {} remove {} } }"), 7378("0416", BadReference | NotUsedWarning | BadAttributeValue, "class Nested { [Attr1(p1)] static event System.Action E { add {} remove {} } }"), 7379("0417", BadReference | NotUsedWarning | BadAttributeValue, "class Nested { [Attr1(p1)] void M() {} }"), 7380("0418", BadReference | NotUsedWarning | BadAttributeValue, "class Nested { [Attr1(p1)] int P { get { return 0; } } }"), 7381("0419", BadReference | NotUsedWarning | BadAttributeValue, "class Nested { [Attr1(p1)] int P { set {} } }"), 7382("0420", BadReference | NotUsedWarning | BadAttributeValue, "class Nested { [Attr1(p1)] int P { set {} get { return 0; } } }"), 7383("0421", BadReference | NotUsedWarning | BadAttributeValue, "class Nested { [Attr1(p1)] int P { get => 0; set {} } }"), 7384("0422", BadReference | NotUsedWarning | BadAttributeValue, "class Nested { [Attr1(p1)] event System.Action E { add {} remove {} } }"), 7385("0423", BadReference | NotUsedWarning | BadAttributeValue, "class Nested { [Attr1(p1)] event System.Action E { add {} remove {} } }"), 7386("0424", BadReference | NotUsedWarning | BadAttributeValue, "class Nested { [Attr1(p1)] int this[int x] { get { return 0; } } }"), 7387("0425", BadReference | NotUsedWarning | BadAttributeValue, "class Nested { [Attr1(p1)] int this[int x] { set {} } }"), 7388("0426", BadReference | NotUsedWarning | BadAttributeValue, "class Nested { [Attr1(p1)] int this[int x] { set {} get { return 0; } } }"), 7389("0427", BadReference | NotUsedWarning | BadAttributeValue, "class Nested { [Attr1(p1)] int this[int x] { get => 0; set {} } }"), 7390("0428", BadReference | NotUsedWarning | BadAttributeValue, "class Nested { [Attr1(p1)] ~Nested() {} }"), 7391("0430", BadReference | NotUsedWarning | BadAttributeValue, "class Nested { [Attr1(p1)] public Nested() {} }"), 7392("0431", BadReference | NotUsedWarning | BadAttributeValue, "class Nested { static int P { [Attr1(p1)] get { return 0; } } }"), 7393("0432", BadReference | NotUsedWarning | BadAttributeValue, "class Nested { static int P { [Attr1(p1)] set {} } }"), 7394("0433", BadReference | NotUsedWarning | BadAttributeValue, "class Nested { static event System.Action E { [Attr1(p1)] add {} remove {} } }"), 7395("0434", BadReference | NotUsedWarning | BadAttributeValue, "class Nested { static event System.Action E { add {} [Attr1(p1)] remove {} } }"), 7396("0435", BadReference | NotUsedWarning | BadAttributeValue, "class Nested { [Attr1(p1)] class Nested2 {} }"), 7397("0436", BadReference | NotUsedWarning | BadAttributeValue, "class Nested { class Nested2([Attr1(p1)] int p2) { public int F = p2; } }"), 7631("2001", BadReference | NotUsedWarning | BadAttributeValue | Shadows, "public System.Action F = () => { [Attr1(p1)] void local(){} local(); };"), 7632("2002", BadReference | NotUsedWarning | BadAttributeValue | Shadows, "public System.Action P {get;} = () => { [Attr1(p1)] void local(){} local(); };"), 7633("2003", BadReference | NotUsedWarning | BadAttributeValue | Shadows, "public event System.Action E = () => { [Attr1(p1)] void local(){} local(); };"), 7634("2004", BadReference | NotUsedWarning | BadAttributeValue | Shadows, "public static System.Action F = () => { [Attr1(p1)] void local(){} local(); };"), 7635("2006", BadReference | NotUsedWarning | BadAttributeValue | Shadows, "public static System.Action P {get;} = () => { [Attr1(p1)] void local(){} local(); };"), 7636("2007", BadReference | NotUsedWarning | BadAttributeValue | Shadows, "public static event System.Action E = () => { [Attr1(p1)] void local(){} local(); };"), 7637("2008", BadReference | NotUsedWarning | BadAttributeValue, "static C1() { [Attr1(p1)] void local(){} local(); }"), 7638("2009", BadReference | NotUsedWarning | BadAttributeValue, "static void M() { [Attr1(p1)] void local(){} local(); }"), 7639("2011", BadReference | NotUsedWarning | BadAttributeValue, "static int P { get { [Attr1(p1)] void local(){} local(); return 0; } }"), 7640("2012", BadReference | NotUsedWarning | BadAttributeValue, "static int P { set { [Attr1(p1)] void local(){} local(); } }"), 7641("2013", BadReference | NotUsedWarning | BadAttributeValue, "static int P { set {} get { [Attr1(p1)] void local(){} local(); return 0; } }"), 7642("2014", BadReference | NotUsedWarning | BadAttributeValue, "static int P { get => 0; set { [Attr1(p1)] void local(){} local(); } }"), 7643("2015", BadReference | NotUsedWarning | BadAttributeValue, "static event System.Action E { add { [Attr1(p1)] void local(){} local(); } remove {} }"), 7644("2016", BadReference | NotUsedWarning | BadAttributeValue, "static event System.Action E { add {} remove { [Attr1(p1)] void local(){} local(); } }"), 7645("2017", BadReference | NotUsedWarning | BadAttributeValue, "void M() { [Attr1(p1)] void local(){} local(); }"), 7646("2018", BadReference | NotUsedWarning | BadAttributeValue, "int P { get { [Attr1(p1)] void local(){} local(); return 0; } }"), 7647("2019", BadReference | NotUsedWarning | BadAttributeValue, "int P { set { [Attr1(p1)] void local(){} local(); } }"), 7648("2020", BadReference | NotUsedWarning | BadAttributeValue, "int P { set {} get { [Attr1(p1)] void local(){} local(); return 0; } }"), 7649("2021", BadReference | NotUsedWarning | BadAttributeValue, "int P { get => 0; set { [Attr1(p1)] void local(){} local(); } }"), 7650("2022", BadReference | NotUsedWarning | BadAttributeValue, "event System.Action E { add { [Attr1(p1)] void local(){} local(); } remove {} }"), 7651("2023", BadReference | NotUsedWarning | BadAttributeValue, "event System.Action E { add {} remove { [Attr1(p1)] void local(){} local(); } }"), 7652("2024", BadReference | NotUsedWarning | BadAttributeValue, "int this[int x] { get { [Attr1(p1)] void local(){} local(); return 0; } }"), 7653("2025", BadReference | NotUsedWarning | BadAttributeValue, "int this[int x] { set { [Attr1(p1)] void local(){} local(); } }"), 7654("2026", BadReference | NotUsedWarning | BadAttributeValue, "int this[int x] { set {} get { [Attr1(p1)] void local(){} local(); return 0; } }"), 7655("2027", BadReference | NotUsedWarning | BadAttributeValue, "int this[int x] { get => 0; set { [Attr1(p1)] void local(){} local(); } }"), 7656("2028", BadReference | NotUsedWarning | BadAttributeValue, "~C1() { [Attr1(p1)] void local(){} local(); }"), 7657("2029", BadReference | NotUsedWarning | BadAttributeValue, "public C1() : this(() => { [Attr1(p1)] void local(){} local(); }) {} C1(System.Action x) : this(0) {}"), 7658("2030", BadReference | NotUsedWarning | BadAttributeValue, "public C1() : this(0) { [Attr1(p1)] void local(){} local(); }"), 7659("2035", BadReference | NotUsedWarning | BadAttributeValue, "class Nested() : NestedBase(() => { [Attr1(p1)] void local(){} local(); }) {} class NestedBase(System.Action x) { object F = x; } "), 8014if ((flags & TestFlags.BadAttributeValue) != 0) 8084if ((flags & (TestFlags.BadReference | TestFlags.BadDefaultValue | TestFlags.BadAttributeValue)) != 0) 8169("0001", BadReference | BadAttributeValue | NotUsedWarning, "[Attr1(p1)]"),