فهرست منبع

Remove useless assertion in find_import_path

gingerBill 6 سال پیش
والد
کامیت
6d3203c11b
1فایلهای تغییر یافته به همراه3 افزوده شده و 1 حذف شده
  1. 3 1
      src/checker.cpp

+ 3 - 1
src/checker.cpp

@@ -2776,7 +2776,9 @@ Array<ImportPathItem> find_import_path(Checker *c, AstPackage *start, AstPackage
 				} else {
 					continue;
 				}
-				GB_ASSERT(pkg != nullptr && pkg->scope != nullptr);
+				if (pkg == nullptr || pkg->scope == nullptr) {
+					continue;
+				}
 
 				if (pkg->kind == Package_Runtime) {
 					// NOTE(bill): Allow cyclic imports within the runtime package for the time being