hades-lang
hades-lang copied to clipboard
Expression body closures with void return type cause compiler crash
def nothing(): Void {}
def call(f: || -> Void): Void {
f()
}
def main(): Void {
call(|| nothing())
}
As a workaround, you can wrap the body in braces to force the compiler to treat it correctly
call(|| { nothing(); })