Selaa lähdekoodia

setField now sets the scope for this when the value is a lambda function haXe/PHP

Franco Ponticelli 16 vuotta sitten
vanhempi
commit
ee1956c130
1 muutettua tiedostoa jossa 1 lisäystä ja 0 poistoa
  1. 1 0
      std/Reflect.hx

+ 1 - 0
std/Reflect.hx

@@ -89,6 +89,7 @@ class Reflect {
 			if( __dollar__typeof(o) == __dollar__tobject )
 				__dollar__objset(o,__dollar__hash(field.__s),value);
 		#elseif php
+			untyped __php__("if (is_array($value) && get_class($value[0]) == '_hx_lambda') $value[0]->scope = $o");
 			untyped __php__("$o->$field = $value");
 		#end
 	}