Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overloading annotations #84

Open
gmhta opened this issue Jan 22, 2020 · 1 comment
Open

Overloading annotations #84

gmhta opened this issue Jan 22, 2020 · 1 comment

Comments

@gmhta
Copy link
Contributor

gmhta commented Jan 22, 2020

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;
};
@timbod7
Copy link
Collaborator

timbod7 commented Jan 22, 2020

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".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants