Open PtrMan opened 3 years ago
The compiler should infer types correctly and not push type-inference to the backend (C).
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}; | ^
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:
gives a compile error from the gcc: