test/script/basic/JDK-8011718.js

changeset 962
ac62e33a99b0
parent 0
b1a7da25b547
equal deleted inserted replaced
961:93b032dd26bc 962:ac62e33a99b0
26 * 26 *
27 * @test 27 * @test
28 * @run 28 * @run
29 */ 29 */
30 30
31 var obj = { 31 var obj = {
32 hello:"From obj", 32 hello:"From obj",
33 }; 33 };
34 var obj2 = { 34 var obj2 = {
35 hello:"From obj2", 35 hello:"From obj2",
36 }; 36 };
37 37
38 function doit(cb){ 38 function doit(cb){
39 cb(); 39 cb();
40 var cb2 = cb.bind(obj2, "This one is not acccepted"); 40 var cb2 = cb.bind(obj2, "This one is not acccepted");
41 cb2(); 41 cb2();
42 } 42 }
43 43
44 doit(function(){ 44 doit(function(){
45 print(this.hello); 45 print(this.hello);
46 }.bind(obj)); 46 }.bind(obj));

mercurial