Menu

Commit [r13097]  Maximize  Restore  History

C# back end: type a function from its widest RETURN

A function not covered by the prototypes has its signature worked out by
scanning its RETURN statements - and the scan stopped at the first one it
found. A 4GL function may return different numbers of values on different
paths, so where a later path returned more, the function was typed too narrow
and its calls would not compile.

It now keeps the RETURN that yields the most values, matching how the compiler
chooses between a function's prototype variants (r13096): the signature has to
suit every call site, and the widest does.

mikeaubury 2026-09-06

changed /aubit4glsrc/trunk/lib/liblex/lex_cs/compile_cs.c
/aubit4glsrc/trunk/lib/liblex/lex_cs/compile_cs.c Diff Switch to side-by-side view
Loading...