Browse Source

lose Null<T> in DynamicAccessKeyValueIterator so the object inlining is not prevented (closes #10118)

Aleksandr Kuzmenko 4 years ago
parent
commit
f0632abb76
2 changed files with 2 additions and 1 deletions
  1. 1 0
      extra/CHANGES.txt
  2. 1 1
      std/haxe/iterators/DynamicAccessKeyValueIterator.hx

+ 1 - 0
extra/CHANGES.txt

@@ -9,6 +9,7 @@
 	Bugfixes:
 
 	all : fixed compiler hanging on `switch` for abstracts with implicit casts involving type parameters and constraints (#10082)
+	all : fixed inlining of `haxe.DynamicAccess.keyValueIterator` (#10118)
 	cpp : fixed handling of `cpp.ConstCharStar` with analyzer enabled (#9733)
 
 2021-02-09 4.2.0:

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

@@ -48,6 +48,6 @@ class DynamicAccessKeyValueIterator<T> {
 	**/
 	public inline function next():{key:String, value:T} {
 		var key = keys[index++];
-		return {value: access[key], key: key};
+		return {value: (access[key] : T), key: key};
 	}
 }