@@ -313,7 +313,7 @@ uniontype Variable
313313
314314 record FUNCTION_PTR
315315 String name;
316- DAE . ExpType ty ;
316+ list < DAE . ExpType > tys ;
317317 list< Variable > args;
318318 end FUNCTION_PTR ;
319319end Variable ;
@@ -1049,7 +1049,7 @@ algorithm
10491049 local
10501050 String name;
10511051 /* Yes, they are VARIABLE, not FUNCTION_PTR. */
1052- case FUNCTION_PTR (ty = _)
1052+ case FUNCTION_PTR (tys = _)
10531053 then true ;
10541054 case _ then false ;
10551055 end matchcontinue;
@@ -1341,17 +1341,30 @@ algorithm
13411341 DAE . ComponentRef cref_;
13421342 list< Types . FuncArg > args;
13431343 DAE . Type res_ty;
1344- DAE . ExpType res_exp_ty ;
1344+ list < DAE . ExpType > etys ;
13451345 list< Variable > var_args;
1346+ list< DAE . Type > tys;
13461347
1347- case ((name, tty as (DAE . T_FUNCTION (funcArg = args, funcResultType = res_ty), _)))
1348+ case ((name, tty as (DAE . T_FUNCTION (funcArg = args, funcResultType = (DAE . T_TUPLE (tys),_)), _)))
1349+ equation
1350+ var_args = Util . listMap(args, typesSimFunctionArg);
1351+ etys = Util . listMap(tys, Types . elabType);
1352+ then
1353+ FUNCTION_PTR (name, etys, var_args);
1354+
1355+ case ((name, tty as (DAE . T_FUNCTION (funcArg = args, funcResultType = (DAE . T_NORETCALL (),_)), _)))
13481356 equation
1349- // expType = Types.elabType(tty);
1350- res_exp_ty = Types . elabType(res_ty);
13511357 var_args = Util . listMap(args, typesSimFunctionArg);
13521358 then
1353- FUNCTION_PTR (name, res_exp_ty , var_args);
1359+ FUNCTION_PTR (name, {} , var_args);
13541360
1361+ case ((name, tty as (DAE . T_FUNCTION (funcArg = args, funcResultType = res_ty), _)))
1362+ equation
1363+ expType = Types . elabType(res_ty);
1364+ var_args = Util . listMap(args, typesSimFunctionArg);
1365+ then
1366+ FUNCTION_PTR (name, {expType}, var_args);
1367+
13551368 case ((name,tty))
13561369 equation
13571370 expType = Types . elabType(tty);
0 commit comments