Skip to content
This repository has been archived by the owner on Aug 26, 2021. It is now read-only.

Forbid modules who extend from non-Object class types. #196

Merged
merged 1 commit into from
Mar 27, 2013

Conversation

JakeWharton
Copy link
Member

Closes #188.

if (result.containsKey(moduleName)) continue;
result.put(moduleName, new ArrayList<ExecutableElement>());
} else {
throw new AssertionError();
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was unsure about this. Enforced by @Target on the annotation, right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should I flip the logic?

if (!module.getKind().equals(ElementKind.CLASS)) {
  throw new AssertionError();
}

TypeElement moduleType = ...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I guess it could be on an interface or enum. I'll mark as an error as well.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup. But flipping the logic is good.

@swankjesse
Copy link
Member

LGTM

JakeWharton added a commit that referenced this pull request Mar 27, 2013
Forbid modules who extend from non-Object class types.
@JakeWharton JakeWharton merged commit 079a3dc into master Mar 27, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

inherited providers for qualified dependencies not found by compiler when checking for completeness
3 participants