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

2015-06-23 Thread sigod via Digitalmars-d-learn
On Tuesday, 23 June 2015 at 23:52:52 UTC, Adam D. Ruppe wrote: On Tuesday, 23 June 2015 at 23:14:13 UTC, Steven Schveighoffer wrote: I'm not completely sure on the syntax, try adding some parens. Yeah, I'm pretty sure it needs to be @(full.name.here) void foo() Yep, something like this work

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

2015-06-23 Thread Adam D. Ruppe via Digitalmars-d-learn
On Tuesday, 23 June 2015 at 23:14:13 UTC, Steven Schveighoffer wrote: I'm not completely sure on the syntax, try adding some parens. Yeah, I'm pretty sure it needs to be @(full.name.here) void foo()

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

2015-06-23 Thread Steven Schveighoffer via Digitalmars-d-learn
On 6/23/15 7:00 PM, sigod wrote: On Tuesday, 23 June 2015 at 22:10:43 UTC, Steven Schveighoffer wrote: You can use @full.path.name ``` Error: unexpected ( in declarator Error: basic type expected, not "_id" Error: found '"_id"' when expecting ')' Error: no identifier for declarator .data.seria

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

2015-06-23 Thread sigod via Digitalmars-d-learn
On Tuesday, 23 June 2015 at 22:10:43 UTC, Steven Schveighoffer wrote: You can use @full.path.name ``` Error: unexpected ( in declarator Error: basic type expected, not "_id" Error: found '"_id"' when expecting ')' Error: no identifier for declarator .data.serialization.name(int) Error: semicolo

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

2015-06-23 Thread Steven Schveighoffer via Digitalmars-d-learn
On 6/23/15 4:53 PM, sigod wrote: 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? Yes, nam