Fix compiler crash on missing let body
This commit is contained in:
@@ -208,7 +208,11 @@ failing_contracts() ->
|
||||
<<"Repeated argument y to function repeated_arg (at line 44, column 12).">>,
|
||||
<<"No record type with fields y, z (at line 14, column 22)">>,
|
||||
<<"The field z is missing when constructing an element of type r2 (at line 15, column 24)">>,
|
||||
<<"Record type r2 does not have field y (at line 15, column 22)">>]}
|
||||
<<"Record type r2 does not have field y (at line 15, column 22)">>,
|
||||
<<"Let binding at line 47, column 5 must be followed by an expression">>,
|
||||
<<"Let binding at line 50, column 5 must be followed by an expression">>,
|
||||
<<"Let binding at line 54, column 5 must be followed by an expression">>,
|
||||
<<"Let binding at line 58, column 5 must be followed by an expression">>]}
|
||||
, {"init_type_error",
|
||||
[<<"Cannot unify string\n"
|
||||
" and map(int, int)\n"
|
||||
|
||||
@@ -42,3 +42,18 @@ contract Test =
|
||||
set_x(set_x(x, r), x)
|
||||
|
||||
function repeated_arg(x : int, y, x : string, y : bool) : string = x
|
||||
|
||||
function missing1() =
|
||||
let x = 0
|
||||
|
||||
function missing_fun1() =
|
||||
let f(x) = x
|
||||
|
||||
function missing2() =
|
||||
let x = 0
|
||||
let y = 0
|
||||
|
||||
function missing_fun2() =
|
||||
let f() = 0
|
||||
let g() = f()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user