jasmin-lang/jasmin

Non-inline call to export function should be a simple warning

Closed this issue · 0 comments

vbgl commented

Type-checking the following program produces a type error. This is twice wrong:

  1. the program is well-typed
  2. there is a canonical fix to make thy compiler happy (namely, tag the call to id as inline)
export fn id(reg u64 x) -> reg u64 { x = x; return x; }

inline
fn whynot(reg u64 a) -> reg u64 {
  a = id(a);
  return a;
}