-
Notifications
You must be signed in to change notification settings - Fork 32
Open
Description
The compiler should infer types correctly and not push type-inference to the backend (C).
If this is a code issue, provide a minimal code example:
include "math.h";
function exp(v:(Float64,Float64)):(Float64,Float64) {
var r = expf(v[0]);
var d = 0.0;
return (r,d);
}gives a compile error from the gcc:
Error: build/lib/kit_test0.c: In Funktion »test0__exp«:
build/lib/kit_test0.c:19:12: Fehler: unverträgliche Typen bei Rückgabe von Typ »struct tuple2bf0b99cc56f6aa69d896315«, aber »struct tuplee7731a893109b41a186a62ef« wurde erwartet
19 | return (struct tuple2bf0b99cc56f6aa69d896315) {.__slot0 = r, .__slot1 = d};
| ^
Metadata
Metadata
Assignees
Labels
No labels