瀏覽代碼

Make runtime.slice_handle_error explicitly diverging

gingerBill 5 年之前
父節點
當前提交
b9f511954a
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      core/runtime/error_checks.odin

+ 1 - 1
core/runtime/error_checks.odin

@@ -35,7 +35,7 @@ bounds_check_error :: proc "contextless" (file: string, line, column: int, index
 	handle_error(file, line, column, index, count);
 	handle_error(file, line, column, index, count);
 }
 }
 
 
-slice_handle_error :: proc "contextless" (file: string, line, column: int, lo, hi: int, len: int) {
+slice_handle_error :: proc "contextless" (file: string, line, column: int, lo, hi: int, len: int) -> ! {
 	context = default_context();
 	context = default_context();
 	fd := os_stderr();
 	fd := os_stderr();
 	print_caller_location(fd, Source_Code_Location{file, line, column, "", 0});
 	print_caller_location(fd, Source_Code_Location{file, line, column, "", 0});