#load(path, type)

where `type` can be `string` or `[]T` where `T` is a simple type
This commit is contained in:
gingerBill
2022-08-11 14:30:14 +01:00
parent 70dc0c15fd
commit a7c3906003
4 changed files with 143 additions and 9 deletions
+2 -2
View File
@@ -391,8 +391,8 @@ lbValue lb_const_value(lbModule *m, Type *type, ExactValue value, bool allow_loc
if (is_type_slice(type)) {
if (value.kind == ExactValue_String) {
GB_ASSERT(is_type_u8_slice(type));
res.value = lb_find_or_add_entity_string_byte_slice(m, value.value_string).value;
GB_ASSERT(is_type_slice(type));
res.value = lb_find_or_add_entity_string_byte_slice_with_type(m, value.value_string, original_type).value;
return res;
} else {
ast_node(cl, CompoundLit, value.value_compound);