--- old/src/jdk.internal.clang/share/classes/jdk/internal/clang/Type.java 2018-09-12 18:47:34.000000000 +0530 +++ new/src/jdk.internal.clang/share/classes/jdk/internal/clang/Type.java 2018-09-12 18:47:34.000000000 +0530 @@ -68,4 +68,22 @@ } public native Cursor getDeclarationCursor(); + + public native boolean equalType(Type other); + + @Override + public boolean equals(Object other) { + if (this == other) { + return true; + } + if (!(other instanceof Type)) { + return false; + } + return equalType((Type)other); + } + + @Override + public int hashCode() { + return spelling().hashCode(); + } }