Skip to content

Display malformed view/entrypoint errors in LSP

Contracts like

let e = 2

[@entry]
let e a b = a b

let c = 3

[@view]
let x = 3

can't be compiled since @view and @entry are used incorrectly here.

Those errors are thrown by passes 10-checking and 11-self_ast_typed, but somehow we don't see them in LSP

Probably its partly related to exit_with_error used instead of raise.