src/jdk/nashorn/internal/objects/GenericPropertyDescriptor.java
Print this page
*** 147,156 ****
--- 147,173 ----
public int type() {
return GENERIC;
}
@Override
+ public boolean hasAndEquals(final PropertyDescriptor other) {
+ if (has(CONFIGURABLE) && other.has(CONFIGURABLE)) {
+ if (isConfigurable() != other.isConfigurable()) {
+ return false;
+ }
+ }
+
+ if (has(ENUMERABLE) && other.has(ENUMERABLE)) {
+ if (isEnumerable() != other.isEnumerable()) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ @Override
public boolean equals(final Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof GenericPropertyDescriptor)) {