Closed shym closed 1 year ago
The following code is accepted by the OCaml type checker:
fun true : int -> 12
(besides the obviously non-exhaustive pattern true), meaning that the int is the return type but the Gospel typechecker accepts the following:
true
int
val f : int list -> int (*@ y = f xs ensures List.for_all (fun x : int -> true) xs *)
where int is interpreted as the type for the argument x.
x
will now report a syntax error at : int as the type annotation is not handled by the parser.
: int
Fixed by #309
The following code is accepted by the OCaml type checker:
(besides the obviously non-exhaustive pattern
true
), meaning that theint
is the return type but the Gospel typechecker accepts the following:where
int
is interpreted as the type for the argumentx
.