Skip to content

Commit

Permalink
Variable names are displayed in variable shadowing
Browse files Browse the repository at this point in the history
  • Loading branch information
artoy committed Dec 19, 2022
1 parent ab43ff8 commit 5c31e25
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/simpleChecker.ml
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ let init_tyenv fenv { name; args; _ } =

let add_var v t ctxt =
if StringMap.mem v ctxt.tyenv then
failwith "variable shadowing"
failwith ("variable shadowing: " ^ v)
else
{ ctxt with tyenv = StringMap.add v t ctxt.tyenv }

Expand Down

0 comments on commit 5c31e25

Please sign in to comment.