Fix equals method of ClassOrInterface

This commit is contained in:
Daniel Holle 2024-08-05 11:54:13 +02:00
parent a654f55deb
commit 7785c2d0aa

View File

@ -188,9 +188,8 @@ public class ClassOrInterface extends SyntaxTreeNode implements TypeScope {
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
ClassOrInterface that = (ClassOrInterface) o;
return Objects.equals(name, that.name);
if (!(o instanceof ClassOrInterface other)) return false;
return Objects.equals(name, other.name);
}
@Override