Browse Source

Add missing package qualifier to alloc

Antonino Simone Di Stefano 10 months ago
parent
commit
3d202da63f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      examples/demo/demo.odin

+ 1 - 1
examples/demo/demo.odin

@@ -906,7 +906,7 @@ parametric_polymorphism :: proc() {
 
 	// This is how `new` is implemented
 	alloc_type :: proc($T: typeid) -> ^T {
-		t := cast(^T)alloc(size_of(T), align_of(T))
+		t := cast(^T)mem.alloc(size_of(T), align_of(T))
 		t^ = T{} // Use default initialization value
 		return t
 	}