digitalmars.D.learn - UDA and static struct fields
- Andrea Fontana (3/3) May 24 2018 Is this a bug or am I missing something?
- Simen =?UTF-8?B?S2rDpnLDpXM=?= (8/11) May 24 2018 This line:
- Andrea Fontana (2/16) May 24 2018 What?
- Alex (4/19) May 24 2018 a dot is missing, but essentially, Simen found it :)
- Andrea Fontana (4/24) May 24 2018 Whoops I didn't get it.
- Andrea Fontana (2/29) May 24 2018 Why didn't that return any error, anyway?
- bauss (6/38) May 24 2018 Because:
Is this a bug or am I missing something? https://run.dlang.io/is/OGHJYX Andrea
May 24 2018
On Thursday, 24 May 2018 at 07:47:54 UTC, Andrea Fontana wrote:Is this a bug or am I missing something? https://run.dlang.io/is/OGHJYX AndreaThis line: mixin("alias tmp = " ~ s ~ ";"); There's no mention of Symbol in there. If you change it to this: mixin("alias tmp = Symbol" ~ s ~ ";"); then suddenly things work. -- Simen
May 24 2018
On Thursday, 24 May 2018 at 07:59:08 UTC, Simen Kjærås wrote:On Thursday, 24 May 2018 at 07:47:54 UTC, Andrea Fontana wrote:What?Is this a bug or am I missing something? https://run.dlang.io/is/OGHJYX AndreaThis line: mixin("alias tmp = " ~ s ~ ";"); There's no mention of Symbol in there. If you change it to this: mixin("alias tmp = Symbol" ~ s ~ ";"); then suddenly things work. -- Simen
May 24 2018
On Thursday, 24 May 2018 at 08:48:30 UTC, Andrea Fontana wrote:a dot is missing, but essentially, Simen found it :) Line 20 in https://run.dlang.io/is/OGHJYX should be: mixin("alias tmp = Symbol." ~ s ~ ";");This line: mixin("alias tmp = " ~ s ~ ";"); There's no mention of Symbol in there. If you change it to this: mixin("alias tmp = Symbol" ~ s ~ ";"); then suddenly things work. -- SimenWhat?
May 24 2018
On Thursday, 24 May 2018 at 09:17:10 UTC, Alex wrote:On Thursday, 24 May 2018 at 08:48:30 UTC, Andrea Fontana wrote:Whoops I didn't get it. Thank you both. Andreaa dot is missing, but essentially, Simen found it :) Line 20 in https://run.dlang.io/is/OGHJYX should be: mixin("alias tmp = Symbol." ~ s ~ ";");This line: mixin("alias tmp = " ~ s ~ ";"); There's no mention of Symbol in there. If you change it to this: mixin("alias tmp = Symbol" ~ s ~ ";"); then suddenly things work. -- SimenWhat?
May 24 2018
On Thursday, 24 May 2018 at 10:23:41 UTC, Andrea Fontana wrote:On Thursday, 24 May 2018 at 09:17:10 UTC, Alex wrote:Why didn't that return any error, anyway?On Thursday, 24 May 2018 at 08:48:30 UTC, Andrea Fontana wrote:Whoops I didn't get it. Thank you both. Andreaa dot is missing, but essentially, Simen found it :) Line 20 in https://run.dlang.io/is/OGHJYX should be: mixin("alias tmp = Symbol." ~ s ~ ";");This line: mixin("alias tmp = " ~ s ~ ";"); There's no mention of Symbol in there. If you change it to this: mixin("alias tmp = Symbol" ~ s ~ ";"); then suddenly things work. -- SimenWhat?
May 24 2018
On Thursday, 24 May 2018 at 10:42:26 UTC, Andrea Fontana wrote:On Thursday, 24 May 2018 at 10:23:41 UTC, Andrea Fontana wrote:Because: mixin("alias tmp = " ~ s ~ ";"); Translates to: alias tmp = i; And i will be the global i.On Thursday, 24 May 2018 at 09:17:10 UTC, Alex wrote:Why didn't that return any error, anyway?On Thursday, 24 May 2018 at 08:48:30 UTC, Andrea Fontana wrote:Whoops I didn't get it. Thank you both. Andreaa dot is missing, but essentially, Simen found it :) Line 20 in https://run.dlang.io/is/OGHJYX should be: mixin("alias tmp = Symbol." ~ s ~ ";");This line: mixin("alias tmp = " ~ s ~ ";"); There's no mention of Symbol in there. If you change it to this: mixin("alias tmp = Symbol" ~ s ~ ";"); then suddenly things work. -- SimenWhat?
May 24 2018