cannot use UDA with same name as one of field's name

sigod via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Jun 23 13:53:50 PDT 2015


Hi. I have few questions about this piece of code.

```
import vibe.data.serialization;

struct User
{
	@name("_id") int id; // Error: function expected before (), not 
name of type string
	string name;
}
```

Is it even proper compiler behavior? Is there any way to bypass 
it without using alias (e.g. `alias named = name;`)?


More information about the Digitalmars-d-learn mailing list