synth_assign
This commit is contained in:
parent
0fb9b8603b
commit
f82e28cd8b
1 changed files with 7 additions and 1 deletions
|
@ -191,7 +191,13 @@ and synth_assign
|
|||
: HopixTypes.typing_environment -> expression Position.located
|
||||
-> expression Position.located -> HopixTypes.aty
|
||||
=
|
||||
fun tenv ref expr -> failwith "Students! This is your job! (synth_assign)"
|
||||
fun tenv ref expr ->
|
||||
let refty = synth_expression tenv ref in
|
||||
match HopixTypes.destruct_reference_type expr.position refty with
|
||||
| expected ->
|
||||
let given = synth_expression tenv expr in
|
||||
check_equal_types expr.position ~expected ~given;
|
||||
HopixTypes.hunit
|
||||
|
||||
and synth_read
|
||||
: HopixTypes.typing_environment -> expression Position.located -> HopixTypes.aty
|
||||
|
|
Reference in a new issue