gleam-lang / gleam

⭐️ A friendly language for building type-safe, scalable systems!
https://gleam.run
Apache License 2.0
17.42k stars 723 forks source link

Unimplemented function? #3335

Closed liigo closed 2 months ago

liigo commented 2 months ago

this code defines an empty-body function x, that's ok, should not have compile error

pub fn main() {
  x()
}

fn x() {
}
Error: This has not yet been implemented
warning: Unimplemented function
  ┌─ /src/main.gleam:5:1
  │
5 │ fn x() {
  │ ^^^^^^ This code is incomplete

This code will crash if it is run. Be sure to finish it before
running your program.
lpil commented 2 months ago

Hello! The warning is correct, your code is incomplete and that function does not return anything.