TypeScript/tests/baselines/reference/propertyWrappedInTry.js
2015-02-06 18:45:09 -08:00

36 lines
466 B
JavaScript

//// [propertyWrappedInTry.ts]
class Foo {
try {
public bar = someInitThatMightFail();
} catch(e) {}
public baz() {
return this.bar; // doesn't get rewritten to Foo.bar.
}
}
//// [propertyWrappedInTry.js]
var Foo = (function () {
function Foo() {
}
return Foo;
})();
try {
bar = someInitThatMightFail();
}
catch (e) { }
baz();
{
return this.bar; // doesn't get rewritten to Foo.bar.
}