Add new shorthand

This commit is contained in:
gingerBill committed 2022-02-13 16:56:27 +00:00
1 parent 9dc83bc1b3
commit 2958c1d6aa
2 files changed
+29 -21

No files matched your search

+3
View File
@@ -31,6 +31,9 @@ copy :: proc(self: ^Copying($T)) -> ^T where intrinsics.type_is_subtype_of(T, Ob
return msgSend(^T, self, "copy")
}
new :: proc($T: typeid) -> ^T where intrinsics.type_is_subtype_of(T, Object) {
return init(alloc(T))
}
@(objc_type=Object, objc_name="retain")
retain :: proc(self: ^Object) {