Skip to content

Commit

Permalink
die when writing out empty module or type name
Browse files Browse the repository at this point in the history
The reader would die anyway
  • Loading branch information
Simn committed Jan 24, 2024
1 parent 5903203 commit 9417cee
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/compiler/hxb/hxbWriter.ml
Original file line number Diff line number Diff line change
Expand Up @@ -596,6 +596,8 @@ module HxbWriter = struct

let write_full_path writer (pack : string list) (mname : string) (tname : string) =
Chunk.write_list writer.chunk pack (Chunk.write_string writer.chunk);
if mname = "" || tname = "" then
die (Printf.sprintf "write_full_path: pack = %s, mname = %s, tname = %s" (String.concat "." pack) mname tname) __LOC__;
Chunk.write_string writer.chunk mname;
Chunk.write_string writer.chunk tname

Expand Down

0 comments on commit 9417cee

Please sign in to comment.