On Saturday, 3 April 2021 at 04:03:14 UTC, rikki cattermole wrote:
This doesn't explain it well, but you were adding types as
attributes on to those symbols. Not struct instances.
omg - that's dumb - I was thinking the compiler whould be aware
of that.
So, I need to check for isType! first,
"Whether the attributes are values or types is up to the user, and
whether later attributes accumulate or override earlier ones is also up
to how the user interprets them."
This doesn't explain it well, but you were adding types as attributes on
to those symbols. Not struct instances.
I have an attribute scope:
```
@PublicApi {
// ...
}
```
Querying with hasUDA! works as expected.
Later, I added a property to PublicApi:
```
struct PublicApi {
bool exposeDetails;
}
```
And want to ask the compiler via getUDAs! about the boolean but
this fails with:
```Error: type Publ