You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
typedefintProcessFunction(int v);
intfoo(int a) => a *2;
intbar(int b) => b *3;
ProcessFunction process;
voidmain() {
var t =true;
if (t) process = foo;
else process = bar;
}
However this
typedefintProcessFunction(int v);
intfoo(int a) => a *2;
intbar(int b) => b *3;
ProcessFunction process;
voidmain() {
var t =true;
process = t ? foo : bar;
}
results in WARNING: t ? foo : bar (Function) will need runtime check to cast to type (int) → int.