Ver Fonte

force the return type of values in MapKeyValueIterator to be non-Null

this way "type tightening" would allow inlining the object
Dan Korostelev há 5 anos atrás
pai
commit
d0fd88b9b7
1 ficheiros alterados com 1 adições e 1 exclusões
  1. 1 1
      std/haxe/iterators/MapKeyValueIterator.hx

+ 1 - 1
std/haxe/iterators/MapKeyValueIterator.hx

@@ -49,6 +49,6 @@ class MapKeyValueIterator<K, V> {
 	**/
 	public inline function next():{key:K, value:V} {
 		var key = keys.next();
-		return {value: map.get(key), key: key};
+		return {value: @:nullSafety(Off) (map.get(key) : V), key: key};
 	}
 }