Skip to content
Browse files

Use Types.isSameType for comparing TypeMirrors.

The documentation on TypeMirror.equals states "Semantic comparisons of type equality should instead use Types.isSameType(TypeMirror, TypeMirror). The results of t1.equals(t2) and Types.isSameType(t1, t2) may differ.".
  • Loading branch information
JakeWharton committed Aug 26, 2014
1 parent b088b28 commit 61e471df3891cf017755998b83839042f8455c29
Showing with 1 addition and 1 deletion.
  1. +1 −1 compiler/src/main/java/dagger/internal/codegen/
@@ -213,7 +213,7 @@ private void error(String msg, Element element) {
TypeElement moduleType = (TypeElement) module;

// Verify that all modules do not extend from non-Object types.
if (!moduleType.getSuperclass().equals(objectType)) {
if (!types.isSameType(moduleType.getSuperclass(), objectType)) {
error("Modules must not extend from other classes: " + elementToString(module), module);

0 comments on commit 61e471d

Please sign in to comment.
You can’t perform that action at this time.