2014-07-13 01:04:16 +02:00
|
|
|
//// [arrowFunctionInConstructorArgument1.ts]
|
|
|
|
class C {
|
|
|
|
constructor(x: () => void) { }
|
|
|
|
}
|
|
|
|
var c = new C(() => { return asdf; } ) // should error
|
|
|
|
|
|
|
|
|
|
|
|
//// [arrowFunctionInConstructorArgument1.js]
|
|
|
|
var C = (function () {
|
|
|
|
function C(x) {
|
|
|
|
}
|
|
|
|
return C;
|
|
|
|
})();
|
|
|
|
var c = new C(function () {
|
|
|
|
return asdf;
|
2014-08-15 22:18:54 +02:00
|
|
|
}); // should error
|