8072426: Can't compare Java objects to strings or numbers

Reviewed-by: hannesw, lagergren, sundar
This commit is contained in:
Attila Szegedi 2015-02-20 15:47:28 +01:00
parent f3a755b2ab
commit 0a6d13699b
11 changed files with 380 additions and 102 deletions

View file

@ -102,7 +102,18 @@ print(jlist instanceof java.util.List);
print(jlist);
var obj = new JSObject() {
toNumber: function() { return 42; }
getMember: function(name) {
if (name == "valueOf") {
return new JSObject() {
isFunction: function() {
return true;
},
call: function(thiz) {
return 42;
}
};
}
}
};
print(32 + obj);