rsdn/nemerle — Issue #154: Attribute target is not checked
Author: NN---
Created: 2011-10-24 07:34:03+00:00
State: open

```nemerle
using System;

[AttributeUsage(AttributeTargets.Constructor)]
class MyConstructorAttribute : Attribute { }

class A
{
[method: MyConstructor]
public F() : void { }
}
```

This code compiles but is incorrect.
Documentation: http://msdn.microsoft.com/en-us/library/b3787ac0(v=VS.90).aspx
http://msdn.microsoft.com/en-us/library/system.attributetargets.aspx