Skip to content

Commit

Permalink
Discrepancy between TypeBinding.equalsEquals and TypeBinding.notEquals (
Browse files Browse the repository at this point in the history
#3500)

Fixes #2457
  • Loading branch information
stephan-herrmann authored Dec 31, 2024
1 parent fb44704 commit 5c82c91
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1734,6 +1734,10 @@ public static boolean notEquals(TypeBinding that, TypeBinding other) {
return true;
if (that.id != TypeIds.NoId && that.id == other.id)
return false;
if (that instanceof LocalTypeBinding && other instanceof LocalTypeBinding) {
// while a lambda is being resolved, consider a local type as equal to its variant from another lambda copy
return ((LocalTypeBinding) that).sourceStart != ((LocalTypeBinding) other).sourceStart;
}
return true;
}
/** Return the primordial type from which the receiver was cloned. Not all types track a prototype, only {@link SourceTypeBinding},
Expand Down

0 comments on commit 5c82c91

Please sign in to comment.