-
Notifications
You must be signed in to change notification settings - Fork 211
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
Refactor constructor annotations #1366
Conversation
e19435a
to
b939c24
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. I've checked and I think you have all the cases covered
There are no testcases with whitespace between |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
The entire annotation is now a token. There is no way of declaring an annotation with a whitespace between the |
Signed-off-by: Lucas Steuernagel <[email protected]>
Signed-off-by: Lucas Steuernagel <[email protected]>
Signed-off-by: Lucas Steuernagel <[email protected]>
Signed-off-by: Lucas Steuernagel <[email protected]>
Presently, we can declare an account on a Solana constructor using the
@payer(my_account)
annotation, while@seed(my_seed)
refers to a constructor parameter. Such a construction is confusing for the same syntax have two different meanings.This PR limits the scope of annotation above a constructor to accept only literals as parameters (e.g.
@seed("pine_tree")
). Annotations that refer to function parameters must appear before them:constructor (@seed bytes arg1)
. This is another in #1251.