Kaynağa Gözat

[nullsafety] workaround null casting (closes #10312)

Aleksandr Kuzmenko 4 yıl önce
ebeveyn
işleme
d2e5dad1d4
1 değiştirilmiş dosya ile 1 ekleme ve 1 silme
  1. 1 1
      std/hl/_std/haxe/ds/Vector.hx

+ 1 - 1
std/hl/_std/haxe/ds/Vector.hx

@@ -29,7 +29,7 @@ abstract Vector<T>(VectorData<T>) {
 	public inline function new(length:Int) {
 		this = [];
 		if (length > 0)
-			this[length - 1] = cast null;
+			this[length - 1] = @:nullSafety(Off) cast null;
 	}
 
 	@:op([]) public inline function get(index:Int):T {