浏览代码

[std] hl.CArray fix unbound type parameter on unsafeSet (#12280)

Yuxiao Mao 1 月之前
父节点
当前提交
8a5ddf5558
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      std/hl/CArray.hx

+ 1 - 1
std/hl/CArray.hx

@@ -9,7 +9,7 @@ abstract CArray<T>(Abstract<"hl_carray">) {
 
 
 	@:arrayAccess inline function get( index : Int ) : T return untyped this[index];
 	@:arrayAccess inline function get( index : Int ) : T return untyped this[index];
 
 
-	public inline function unsafeSet( index : Int, v : T ) return untyped this[index] = v;
+	public inline function unsafeSet( index : Int, v : T ) : T return untyped this[index] = v;
 
 
 	public static inline function alloc<T>( cl : Class<T>, size : Int ) : CArray<T> {
 	public static inline function alloc<T>( cl : Class<T>, size : Int ) : CArray<T> {
 		return cast alloc_carray( (cast cl:BaseType).__type__ , size );
 		return cast alloc_carray( (cast cl:BaseType).__type__ , size );