gingerBill 7 月之前
父節點
當前提交
2af60b8767
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      src/checker.cpp

+ 4 - 0
src/checker.cpp

@@ -6319,6 +6319,10 @@ gb_internal void check_deferred_procedures(Checker *c) {
 					continue;
 				}
 
+				if (dst_params == nullptr) {
+					error(src->token, "Deferred procedure must have parameters for %s", attribute);
+					continue;
+				}
 				GB_ASSERT(dst_params->kind == Type_Tuple);
 
 				Type *tsrc = alloc_type_tuple();