UDA on double nested struct
Sebastiaan Koppe
mail at skoppe.eu
Mon Aug 20 16:16:04 UTC 2018
Hey, I am trying to get UDAs from a doubly nested struct, to no
avail:
code
---
import std.traits : hasUDA;
enum hover;
struct Style {
struct Root {
auto margin = "10px";
auto backgroundColor = "white";
@hover struct Hover {
auto backgroundColor = "gray";
}
}
}
pragma(msg, hasUDA!(Style.Root.Hover, hover));
---
returns false. Bug or no? (Yes, I am generating css at compile
time.)
Putting it on Root or on Style works as intended;
More information about the Digitalmars-d-learn
mailing list