rsdn/nemerle — Issue #226: DllImportAttribute must be optional on extern methods
Author: NN---
Created: 2012-01-05 16:04:29+00:00
State: open

C#

```cs
namespace N
{
class Program
{
static extern void F();

static void Main()
{
}
}
}

```
warning CS0626: Method, operator, or accessor 'N.Program.F()' is marked external and has no attributes on it. Consider adding a DllImport attribute to specify the external implementation.
```

Nemerle

```nemerle
namespace N
{
module Program
{
extern F() : void;

Main() : void
{
}
}
}
```

```
error: method is marked `extern' but do not have DllImport attribute
```

Nemerle must give warning, not error.