Skip to content

Commit

Permalink
options: fix the order of warn_error
Browse files Browse the repository at this point in the history
See comments in #2950
  • Loading branch information
mtzguido committed May 31, 2023
1 parent 76c9c56 commit 1ec7c7a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/basic/FStar.Errors.fst
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@ let update_flags (l:list (error_flag * string))
in
flag, (l, h)
in
let error_range_settings = List.map compute_range l in
// NOTE: Rev below so when we handle things like '@0..100-50'
// the -50 overrides the @0..100.
let error_range_settings = List.map compute_range (List.rev l) in
List.collect set_flag_for_range error_range_settings
@ default_settings

Expand Down
2 changes: 1 addition & 1 deletion src/basic/FStar.Options.fst
Original file line number Diff line number Diff line change
Expand Up @@ -1283,7 +1283,7 @@ let rec specs_with_types warn_unsafe : list (char * string * opt_type * string)
( noshort,
"warn_error",
Accumulated (SimpleStr ("")),
ReverseAccumulated (SimpleStr ("")),
"The [-warn_error] option follows the OCaml syntax, namely:\n\t\t\
- [r] is a range of warnings (either a number [n], or a range [n..n])\n\t\t\
- [-r] silences range [r]\n\t\t\
Expand Down

0 comments on commit 1ec7c7a

Please sign in to comment.