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

refactor: import of CtRole #2132

Merged
merged 1 commit into from
Jun 28, 2018
Merged

Conversation

surli
Copy link
Collaborator

@surli surli commented Jun 28, 2018

This PR is related to #2100

We used a lot this of construction in our code:

import CtRole;
import static CtRole.AROLE;

@myRole(role = CtRole.AROLE);
public void method() {
  aCall(AROLE);
}

This is perfectly correct code, but it's a kind of redundancy to import twice CtRole where we used only the static field already imported.
Moreover the import mechanism will align all this behaviour to only one import, which is the static one.
Then as we got now one test to check that Spoon imports and computed imports are the same, I propose to refactor to only use the import of the static field.

@monperrus monperrus merged commit 2671993 into INRIA:master Jun 28, 2018
@surli surli mentioned this pull request Jul 4, 2018
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

Successfully merging this pull request may close these issues.

2 participants