浏览代码

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

this way "type tightening" would allow inlining the object
Dan Korostelev 5 年之前
父节点
当前提交
d0fd88b9b7
共有 1 个文件被更改,包括 1 次插入1 次删除
  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} {
 	public inline function next():{key:K, value:V} {
 		var key = keys.next();
 		var key = keys.next();
-		return {value: map.get(key), key: key};
+		return {value: @:nullSafety(Off) (map.get(key) : V), key: key};
 	}
 	}
 }
 }