2
0
Эх сурвалжийг харах

changed haxe.ds.Vector.get to return T instead of Null<T> (closes #3641)

Dan Korostelev 10 жил өмнө
parent
commit
e42500d5d4

+ 1 - 0
extra/CHANGES.txt

@@ -53,6 +53,7 @@
 	all : added haxe.Rest type for representing "rest" arguments in extern method signatures
 	all : added haxe.EitherType abstract type for dealing with externs for dynamic targets
 	all : added haxe.DynamicAccess type for working with dynamic anonymous structures using a Map-like interface
+	all : [breaking] changed haxe.ds.Vector.get to return T instead of Null<T>
 
 	Macro features and changes:
 

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

@@ -81,7 +81,7 @@ abstract Vector<T>(VectorData<T>) {
 		If `index` is negative or exceeds `this.length`, the result is
 		unspecified.
 	**/
-	@:arrayAccess public inline function get(index:Int):Null<T> {
+	@:arrayAccess public inline function get(index:Int):T {
 		#if cpp
 		return this.unsafeGet(index);
 		#elseif python