Programming Language

Nocter

A self-contained systems language built around simplicity, encapsulation, and foolproof design.

/development/compiler/tests/fixtures/source_corpus/invalid/catch-optional.nct

catch-optional.nct

// Invalid: `catch` handles T!, not T?.
func main(): i32 {
    return maybe_answer() catch error {
        return 0
    }
}

func maybe_answer(): i32? {
    return 42
}