Revision 4a840259
Added by Xavier Thirioux almost 10 years ago
src/typing.ml | ||
---|---|---|
287 | 287 |
ty_res |
288 | 288 |
|
289 | 289 |
(* emulates a subtyping relation between types t and (d : t), |
290 |
used during node application only *)
|
|
290 |
used during node applications and assignments *)
|
|
291 | 291 |
and type_subtyping_arg env in_main ?(sub=true) const real_arg formal_type = |
292 | 292 |
let loc = real_arg.expr_loc in |
293 | 293 |
let const = const || (Types.get_static_value formal_type <> None) in |
... | ... | |
486 | 486 |
List.fold_left (fun uvars v -> define_var v uvars) undefined_vars eq.eq_lhs in |
487 | 487 |
(* Type rhs wrt to lhs type with subtyping, i.e. a constant rhs value may be assigned |
488 | 488 |
to a (always non-constant) lhs variable *) |
489 |
type_subtyping_arg env in_main false eq.eq_rhs ty_lhs;
|
|
489 |
type_subtyping_arg env in_main true eq.eq_rhs ty_lhs;
|
|
490 | 490 |
undefined_vars |
491 | 491 |
|
492 | 492 |
|
Also available in: Unified diff
added subtyping in equations (rhs may be a subtype of lhs)
git-svn-id: https://cavale.enseeiht.fr/svn/lustrec/lustre_compiler/trunk@157 041b043f-8d7c-46b2-b46e-ef0dd855326e