<?xml version="1.0"?>
<ErrorDocumentation xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <ErrorName>CS0657</ErrorName>
  <Examples>
    <string>// CS0657: `type' is not a valid attribute location for this declaration. Valid attribute locations for this declaration are `property'. All attributes in this section will be ignored
// Line: 14
// Compiler options: -warnaserror

using System;

[AttributeUsage(AttributeTargets.All)]
public class TestAttribute: Attribute
{
}

class C
{
    [type:Test]
    int Prop {
        set {
        }
    }
}</string>
    <string>// CS0657: `param' is not a valid attribute location for this declaration. Valid attribute locations for this declaration are `assembly, module'. All attributes in this section will be ignored
// Line: 7
// Compiler options: -warnaserror

using System;

[param: CLSCompliant (false)]
public enum E
{
    item
}
</string>
    <string>// CS0657: `assembly' is not a valid attribute location for this declaration. Valid attribute locations for this declaration are `field'. All attributes in this section will be ignored
// Line: 9
// Compiler options: -warnaserror

using System;

public enum E
{
    [assembly: CLSCompliant (false)]
    item
}
</string>
    <string>// CS0657: `method' is not a valid attribute location for this declaration. Valid attribute locations for this declaration are `assembly, module'. All attributes in this section will be ignored
// Line: 5
// Compiler options: -warnaserror

[method: System.CLSCompliant (false)]
</string>
    <string>// CS0657: `assembly' is not a valid attribute location for this declaration. Valid attribute locations for this declaration are `type'. All attributes in this section will be ignored
// Line: 10
// Compiler options: -warnaserror

using System;

[assembly: CLSCompliant (false)]
public class C {}
    
[assembly: CLSCompliant (false)]
public class D {}
</string>
    <string>// CS0657: `param' is not a valid attribute location for this declaration. Valid attribute locations for this declaration are `field'. All attributes in this section will be ignored
// Line: 7
// Compiler options: -warnaserror

struct S
{
    [param: Obsolete]
    int field;
}</string>
    <string>// CS0657: `assembly' is not a valid attribute location for this declaration. Valid attribute locations for this declaration are `type'. All attributes in this section will be ignored
// Line: 8
// Compiler options: -warnaserror

using System.Reflection;

namespace N {
    [assembly: AssemblyKeyName("")]
    class A {}
}

</string>
    <string>// CS0657: `param' is not a valid attribute location for this declaration. Valid attribute locations for this declaration are `method, return'. All attributes in this section will be ignored
// Line: 15
// Compiler options: -warnaserror

using System;

[AttributeUsage(AttributeTargets.All)]
public class TestAttribute: Attribute
{
}

class C
{
    int Prop {
        [param:Test]
        get {
            return 1;
        }
    }
}</string>
    <string>// CS0657: `return' is not a valid attribute location for this declaration. Valid attribute locations for this declaration are `assembly, module'. All attributes in this section will be ignored
// Line: 7
// Compiler options: -warnaserror

using System;

[return: CLSCompliant (false)]

public enum E {}
</string>
    <string>// CS0657: `field' is not a valid attribute location for this declaration. Valid attribute locations for this declaration are `event, method'. All attributes in this section will be ignored
// Line: 8
// Compiler options: -warnaserror

using System;

interface X {
  [field:NonSerialized]
  event EventHandler XEvent;
}
</string>
    <string>// CS0657: `field' is not a valid attribute location for this declaration. Valid attribute locations for this declaration are `event, method'. All attributes in this section will be ignored
// Line: 9
// Compiler options: -warnaserror

using System;

abstract class X
{
	[field:NonSerialized]
	public abstract event EventHandler XEvent;
}
</string>
    <string>// CS0657: `type' is not a valid attribute location for this declaration. Valid attribute locations for this declaration are `param'. All attributes in this section will be ignored
// Line: 15
// Compiler options: -warnaserror

using System;

[AttributeUsage(AttributeTargets.All)]
public class TestAttribute: Attribute
{
}

struct S
{
    void method (
        [type: Test]
        int p) {}
}</string>
    <string>// CS0657: `method' is not a valid attribute location for this declaration. Valid attribute locations for this declaration are `assembly, module'. All attributes in this section will be ignored
// Line: 5
// Compiler options: -warnaserror

[method: Obsolete]
delegate void Delegate ();
</string>
    <string>// CS0657: `param' is not a valid attribute location for this declaration. Valid attribute locations for this declaration are `event, field, method'. All attributes in this section will be ignored
// Line: 9
// Compiler options: -warnaserror

using System;

struct S
{
    [param: Obsolete]
    event ResolveEventHandler field;
}</string>
    <string>// CS0657: `return' is not a valid attribute location for this declaration. Valid attribute locations for this declaration are `method'. All attributes in this section will be ignored
// Line: 9
// Compiler options: -warnaserror

using System;

public class C
{
	[return: CLSCompliant (false)]
	public C ()
	{
	}
}
</string>
    <string>// CS0657: `method' is not a valid attribute location for this declaration. Valid attribute locations for this declaration are `assembly, module'. All attributes in this section will be ignored
// Line : 7
// Compiler options: -warnaserror

using System;

[method: CLSCompliant (false)]

public class C
{
}
</string>
    <string>// CS0657: `param' is not a valid attribute location for this declaration. Valid attribute locations for this declaration are `method, return'. All attributes in this section will be ignored
// Line: 9
// Compiler options: -warnaserror

using System;

struct S
{
    [param: Obsolete]
    void method () {}
}</string>
    <string>// CS0657: `return' is not a valid attribute location for this declaration. Valid attribute locations for this declaration are `method'. All attributes in this section will be ignored
// Line: 9
// Compiler options: -warnaserror

using System;

public class C
{
	[return: CLSCompliant (false)]
	~C ()
	{
	}
}
</string>
    <string>// CS0657: `method' is not a valid attribute location for this declaration. Valid attribute locations for this declaration are `assembly, module'. All attributes in this section will be ignored
// Line: 5
// Compiler options: -warnaserror

[method: Obsolete]
public interface I
{
}
</string>
    <string>// CS0657: `property' is not a valid attribute location for this declaration. Valid attribute locations for this declaration are `event'. All attributes in this section will be ignored
// Line: 9
// Compiler options: -warnaserror

using System;

class C
{
    [property: Obsolete]
    event ResolveEventHandler field { 
        add {}
        remove {}
    }
}
</string>
    <string>// CS0657: `field' is not a valid attribute location for this declaration. Valid attribute locations for this declaration are `param'. All attributes in this section will be ignored
// Line: 9
// Compiler options: -warnaserror -langversion:experimental

using System;

public class FieldAttribute : System.Attribute
{
}

class X ([field:FieldAttribute] int foo)
{
	int v = foo;
}
</string>
    <string>// CS0657: `event' is not a valid attribute location for this declaration. Valid attribute locations for this declaration are `method, param, return'. All attributes in this section will be ignored
// Line: 15
// Compiler options: -warnaserror

using System;

[AttributeUsage(AttributeTargets.All)]
public class TestAttribute: Attribute
{
}

class C
{
    event ResolveEventHandler field { 
        [event: Test]
        add {}
        remove {}
            
    }
}</string>
    <string>// CS0657: `type' is not a valid attribute location for this declaration. Valid attribute locations for this declaration are `method, param, return'. All attributes in this section will be ignored
// Line: 15
// Compiler options: -warnaserror

using System;

[AttributeUsage(AttributeTargets.All)]
public class TestAttribute: Attribute
{
}

class C
{
    int Prop {
        [type:Test]
        set {
        }
    }
}</string>
  </Examples>
</ErrorDocumentation>