File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
clarity/src/vm/ast/definition_sorter Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -90,16 +90,19 @@ impl DefinitionSorter {
9090 let sorted_indexes = walker. get_sorted_dependencies ( & self . graph ) ;
9191
9292 if let Some ( deps) = walker. get_cycling_dependencies ( & self . graph , & sorted_indexes) {
93- let functions_names = deps
93+ let mut function_names = deps
9494 . into_iter ( )
9595 . filter_map ( |i| {
9696 let exp = & contract_ast. pre_expressions [ i] ;
9797 self . find_expression_definition ( exp)
9898 } )
9999 . map ( |i| i. 0 . to_string ( ) )
100100 . collect :: < Vec < _ > > ( ) ;
101+
102+ // Sorting function names to make the error contents deterministic
103+ function_names. sort ( ) ;
101104
102- let error = ParseError :: new ( ParseErrors :: CircularReference ( functions_names ) ) ;
105+ let error = ParseError :: new ( ParseErrors :: CircularReference ( function_names ) ) ;
103106 return Err ( error) ;
104107 }
105108
You can’t perform that action at this time.
0 commit comments