We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Very similar to #59 (which is fixed).
This code behaves different when instrumented:
class Foo { field1 = function() {}; ['field' + 2] = class {}; static ['field' + 3] = function() {}; static field4 = class {}; } console.log(new Foo().field1); console.log(new Foo().field2); console.log(Foo.field3); console.log(Foo.field4);
Normally it prints:
[Function: field1] [class field2] [Function: field3] [class field4]
After instrumentation it prints:
[Function (anonymous)] [class (anonymous)] [Function (anonymous)] [class (anonymous)]
The instrumented code contains:
class Foo { field1 = (cov_1m4qtsm9gj().s[0]++, function() { cov_1m4qtsm9gj().f[0]++; }); ["field" + 2] = (cov_1m4qtsm9gj().s[1]++, class {}); static ["field" + 3] = (cov_1m4qtsm9gj().s[2]++, function() { cov_1m4qtsm9gj().f[1]++; }); static field4 = (cov_1m4qtsm9gj().s[3]++, class {}); } cov_1m4qtsm9gj().s[4]++; console.log(new Foo().field1); cov_1m4qtsm9gj().s[5]++; console.log(new Foo().field2); cov_1m4qtsm9gj().s[6]++; console.log(Foo.field3); cov_1m4qtsm9gj().s[7]++; console.log(Foo.field4);
so the function and class expressions can't infer their names.
Unlike #59 it's not clear where to hoist the counter to, maybe to a temp field above?
class Foo { _cov_0 = cov_1m4qtsm9gj().s[0]++; // <-- field1 = function() { cov_1m4qtsm9gj().f[0]++; }; _cov_1 = cov_1m4qtsm9gj().s[1]++; // <-- ["field" + 2] = class {}; static _cov_2 = cov_1m4qtsm9gj().s[2]++; // <-- static ["field" + 3] = function() { cov_1m4qtsm9gj().f[1]++; }; static _cov_3 = cov_1m4qtsm9gj().s[3]++; // <-- static field4 = class {}; }
What do you think?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Very similar to #59 (which is fixed).
This code behaves different when instrumented:
Normally it prints:
After instrumentation it prints:
The instrumented code contains:
so the function and class expressions can't infer their names.
Unlike #59 it's not clear where to hoist the counter to, maybe to a temp field above?
What do you think?
The text was updated successfully, but these errors were encountered: