Browse Source

[nullsafety] workaround null casting (closes #10312)

Aleksandr Kuzmenko 4 years ago
parent
commit
d2e5dad1d4
1 changed files with 1 additions and 1 deletions
  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 {