adl icon indicating copy to clipboard operation
adl copied to clipboard

Overloading annotations

Open gmhta opened this issue 5 years ago • 1 comments

The last annotation wins. This should either be a compiler error or both annotations should be present. Probably the forma.

struct Survey {
    @UIElement { "elemType" : "Radio" } YNRating rating;
};

annotation  LoginScreen::rating UIElement { "elemType" : "Button" } ;

Different syntax same result.

struct Survey {
    @UIElement { "elemType" : "Radio" } 
    @UIElement { "elemType" : "Button" } 
    YNRating rating;
};

gmhta avatar Jan 22 '20 06:01 gmhta

The intention of annotations is that they can be queried by type. So it doesn't make sense for both to be present.

I'm open to it being an error, rather than "last anotation wins".

timbod7 avatar Jan 22 '20 21:01 timbod7