Closed
Description
TypeScript Version: 2.0.0
Code
class A { }
window.onload = () => {
(<A>{}).toString();
};
Expected behavior: The toString line should compile to: ({}).toString()
or ({}.toString())
and hence there should not be a runtime syntax error
Actual behavior: The toString line compiles to {}.toString()
, which is incorrect syntax and hence a syntax error is thrown at runtime.