浏览代码

Merge pull request #3037 from laytan/fix-wrong-string-type-assert

fix wrong string type assert
Jeroen van Rijn 1 年之前
父节点
当前提交
49fb0acfc9
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/llvm_backend_expr.cpp

+ 1 - 1
src/llvm_backend_expr.cpp

@@ -4105,7 +4105,7 @@ gb_internal lbAddr lb_build_addr_slice_expr(lbProcedure *p, Ast *expr) {
 	}
 
 	case Type_Basic: {
-		GB_ASSERT_MSG(type == t_string, "got %s", type_to_string(type));
+		GB_ASSERT_MSG(are_types_identical(type, t_string), "got %s", type_to_string(type));
 		lbValue len = lb_string_len(p, base);
 		if (high.value == nullptr) high = len;