Missing semicolon in type.ml, plus test to catch regression. Closes #113.

This commit is contained in:
Graydon Hoare 2010-07-19 11:50:30 -07:00
parent 2141154c85
commit bacb8e6b79
2 changed files with 8 additions and 1 deletions

View File

@ -771,7 +771,7 @@ let check_stmt (cx:Semant.ctxt) : (fn_ctx -> Ast.stmt -> unit) =
| Ast.STMT_ret (Some atom) ->
if fn_ctx.fnctx_is_iter then
Common.err None
"iterators can't return values; did you mean 'put'?"
"iterators can't return values; did you mean 'put'?";
demand fn_ctx.fnctx_return_type (check_atom atom)
| Ast.STMT_ret None ->

View File

@ -0,0 +1,7 @@
// error-pattern: mismatched types
fn mk_int() -> uint {
let int i = 3;
ret i;
}
fn main() {
}