diff --git a/src/lustre/lustreAstDependencies.ml b/src/lustre/lustreAstDependencies.ml index 7a81990be..87b9564c5 100644 --- a/src/lustre/lustreAstDependencies.ml +++ b/src/lustre/lustreAstDependencies.ml @@ -303,7 +303,7 @@ let rec mk_graph_type: LA.lustre_type -> dependency_analysis_data = function | History _ -> empty_dependency_analysis_data | TArr (_, aty, rty) -> union_dependency_analysis_data (mk_graph_type aty) (mk_graph_type rty) (* Circular dependencies in refinement type predicates are allowed *) - | RefinementType (_, (_, _, ty), _) -> mk_graph_type ty + | RefinementType (_, (_, _, ty), e) -> union_dependency_analysis_data (mk_graph_type ty) (mk_graph_expr e) (** This graph is useful for analyzing top level constant and type declarations *) and mk_graph_expr ?(only_modes = false) diff --git a/tests/regression/success/ref_type_dep.lus b/tests/regression/success/ref_type_dep.lus new file mode 100644 index 000000000..8b6c60745 --- /dev/null +++ b/tests/regression/success/ref_type_dep.lus @@ -0,0 +1,10 @@ +type Pos = subrange [1,*] of int; + +const N: Pos; + +type I = subtype { i:int | i < N }; + +node M() returns (y: I); +let + y = N-1; +tel \ No newline at end of file