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;
|
|
|
|
})();
|
2015-02-07 05:03:24 +01:00
|
|
|
var c = new C(function () { return asdf; }); // should error
|