-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
Code:
type myFnT1 = (closeAction: myFnT) => number;
function myFunc(closeAction: () => void): number {
return 5;
}
function getDropDownFunction(
controlId: string
): myFnT1 {
switch (controlId) {
case "paste":
return myFunc;
default:
console.log("Undefined Control");
return () => 7; //<------Error
}
}
let fn = getDropDownFunction("paste1");
fn(() => { console.log("close") })
Actual outcome:
Undefined Control
Program received signal SIGSEGV, Segmentation fault.
0x0000555555562b1b in __ts_main () at lib.std.stubs.d.ts:112
Expected outcome:
Undefined Control
Metadata
Metadata
Assignees
Labels
No labels