diff options
author | Paweł Dybiec <pdybiec@stud.cs.uni.wroc.pl> | 2018-11-25 04:40:20 +0100 |
---|---|---|
committer | Paweł Dybiec <pdybiec@stud.cs.uni.wroc.pl> | 2018-11-25 04:40:20 +0100 |
commit | 774d7839d7302e6ebd9b0209ef3d64446048c5f7 (patch) | |
tree | b17788026ab8badc125b02d8accb94cd5c1a208f /source | |
parent | Various improvements for arrays (diff) |
Fix topdown strategy for add
Diffstat (limited to 'source')
-rw-r--r-- | source/mod_student/typechecker.ml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/mod_student/typechecker.ml b/source/mod_student/typechecker.ml index 95e9157..2b380b0 100644 --- a/source/mod_student/typechecker.ml +++ b/source/mod_student/typechecker.ml @@ -191,10 +191,10 @@ module Make() = struct * elementy kontra typ elementu tablicy `tp` *) | EXPR_Struct {elements; _}, TP_Array tp -> List.iter (check_expression env tp) elements - | EXPR_Binop {op=BINOP_And; lhs; rhs;_}, TP_Int -> + | EXPR_Binop {op=BINOP_Add; lhs; rhs;_}, TP_Int -> check_expression env TP_Int lhs; check_expression env TP_Int rhs - | EXPR_Binop {op=BINOP_And; lhs; rhs;_}, (TP_Array tp as t) -> + | EXPR_Binop {op=BINOP_Add; lhs; rhs;_}, (TP_Array tp as t) -> check_expression env t lhs; check_expression env t rhs | EXPR_Index {expr;index;loc; _}, tp -> |