Open GoogleCodeExporter opened 8 years ago
Hi,
have you called Foo constructor and method? Seems like the calls weren't
generated.
Lines you marked with "-" aren't executed until these functions are called.
+ Foo = function(){
+ function Foo(x, y) {
- this.z = x + y // will be executed when constructor is called
+ }
+ Foo.prototype.method = function() {
- ...
- return this.z // will be executed when method is called
+ }
+ return Foo // has been executed, as the anonymous function was called
+ }();
// calls of the constructor and the method should be here
Original comment by hellom...@gmail.com
on 10 Dec 2011 at 6:19
Original issue reported on code.google.com by
funkycoder@gmail.com
on 17 Nov 2011 at 8:38