Check attribute against value
frame
frame86 at live.com
Sat Apr 3 03:25:03 UTC 2021
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 PublicApi has no value```
because I need to rewrite it to
```
@PublicApi() {
// ...
}
```
... which works again.
But how do I check against such cases? And why does a struct not
have a value here?
More information about the Digitalmars-d-learn
mailing list