Skip to content

Commit

Permalink
invert condition and update output
Browse files Browse the repository at this point in the history
  • Loading branch information
crusso committed Sep 27, 2024
1 parent 282f7eb commit f7b5c06
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/mo_frontend/typing.ml
Original file line number Diff line number Diff line change
Expand Up @@ -2975,7 +2975,7 @@ let is_actor_dec d =
| _ -> false

let check_actors ?(viper_mode=false) ?(check_actors=false) scope progs : unit Diag.result =
if check_actors then Diag.return () else
if not check_actors then Diag.return () else
Diag.with_message_store
(fun msgs ->
recover_opt (fun progs ->
Expand Down
2 changes: 1 addition & 1 deletion src/pipeline/pipeline.ml
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ let chase_imports parsefn senv0 imports : (Syntax.lib list * Scope.scope) Diag.r
in
Diag.map (fun () -> (List.rev !libs, !senv)) (go_set None imports)

let load_progs ?(viper_mode=false) ?(check_actors = false) parsefn files senv : load_result =
let load_progs ?(viper_mode=false) ?(check_actors=false) parsefn files senv : load_result =
let open Diag.Syntax in
let* parsed = Diag.traverse (parsefn Source.no_region) files in
let* rs = resolve_progs parsed in
Expand Down
4 changes: 2 additions & 2 deletions test/run-drun/ok/bad-actor.comp-ref.ok
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
bad-actor.mo:2.1-4.2: type error [M0038], misplaced await
bad-actor.mo:2.1-4.2: type error [M0037], misplaced async expression; try enclosing in an async function
bad-actor.mo:2.1-4.2: type error [M0141], an actor or actor class must be the only non-imported declaration in a program
(This is a limitation of the current version and flag -ref-system-api.)
4 changes: 2 additions & 2 deletions test/run-drun/ok/bad-actor.comp.ok
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
bad-actor.mo:2.1-4.2: type error [M0038], misplaced await
bad-actor.mo:2.1-4.2: type error [M0037], misplaced async expression; try enclosing in an async function
bad-actor.mo:2.1-4.2: type error [M0141], an actor or actor class must be the only non-imported declaration in a program
(This is a limitation of the current version.)

0 comments on commit f7b5c06

Please sign in to comment.