소스 검색

Assign element to Slice not Array when alloc a Type_Slice

ryuukk 2 년 전
부모
커밋
a99da47b0d
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/types.cpp

+ 1 - 1
src/types.cpp

@@ -988,7 +988,7 @@ gb_internal Type *alloc_type_enumerated_array(Type *elem, Type *index, ExactValu
 
 gb_internal Type *alloc_type_slice(Type *elem) {
 	Type *t = alloc_type(Type_Slice);
-	t->Array.elem = elem;
+	t->Slice.elem = elem;
 	return t;
 }