Skip to content

Commit d8faf15

Browse files
committed
little refactoring
1 parent da5a24c commit d8faf15

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

core/src/main/java/net/jbock/compiler/TypeTool.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,9 @@ static void unset() {
9292
* @return {@code true} means failure
9393
*/
9494
private boolean unify(TypeMirror x, TypeMirror y, Map<String, TypeMirror> acc) {
95+
if (x.getKind() == TypeKind.TYPEVAR) {
96+
return true; // only y can have typevars
97+
}
9598
if (y.getKind() == TypeKind.TYPEVAR) {
9699
acc.put(y.toString(), x);
97100
return false;

0 commit comments

Comments
 (0)