mirror of https://github.com/svaarala/duktape.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
369 B
24 lines
369 B
/*===
|
|
foo,foo
|
|
===*/
|
|
|
|
/* This used to have a bug: closure numbers would get incorrectly used. */
|
|
|
|
function F() {
|
|
this.values = [];
|
|
}
|
|
F.prototype.f = function() {
|
|
this.values[this.values.length] = 'foo';
|
|
}
|
|
F.prototype.g = function() {
|
|
this.values[this.values.length] = 'bar';
|
|
}
|
|
|
|
function test() {
|
|
var obj = new F();
|
|
obj.f();
|
|
obj.f();
|
|
print(obj.values);
|
|
}
|
|
|
|
test();
|
|
|