salient-lang / salient

http://salient-lang.dev/
MIT License
0 stars 0 forks source link

TODO: Support for functions with `none` return type #6

Closed AjaniBilby closed 5 months ago

AjaniBilby commented 5 months ago

This has already been implemented, I think during #11, but not entirely sure when I did it.
But this does compile so... 🤷

fn main(): none {
  return;
}
(module
  (type (;0;) (func))
  (func (;0;) (type 0)
    return
    unreachable)
  (memory (;0;) 1 1)
  (global (;0;) (mut i32) (i32.const 0))
  (export "_start" (func 0))
  (export "main" (func 0)))