Ver código fonte

[php7] add constructor to php.StdClass extern

Alexander Kuzmenko 8 anos atrás
pai
commit
0b10abb1b4
3 arquivos alterados com 3 adições e 2 exclusões
  1. 1 0
      std/php7/Boot.hx
  2. 1 1
      std/php7/StdClass.hx
  3. 1 1
      std/php7/_std/haxe/ds/ObjectMap.hx

+ 1 - 0
std/php7/Boot.hx

@@ -745,6 +745,7 @@ private class HxDynamicStr {
 private class HxAnon extends StdClass {
 
 	public function new( fields:NativeArray = null ) {
+		super();
 		if (fields != null) {
 			Syntax.foreach(fields, function(name, value) Syntax.setField(this, name, value));
 		}

+ 1 - 1
std/php7/StdClass.hx

@@ -2,5 +2,5 @@ package php;
 
 @:native('StdClass')
 extern class StdClass implements Dynamic {
-
+	function new() : Void;
 }

+ 1 - 1
std/php7/_std/haxe/ds/ObjectMap.hx

@@ -34,7 +34,7 @@ class ObjectMap <K:{ }, V> implements haxe.Constraints.IMap<K,V> {
 		_values = new NativeAssocArray();
 	}
 
-	public function set(key:K, value:V):Void untyped {
+	public function set(key:K, value:V):Void {
 		var id = Global.spl_object_hash(key);
 		_keys[id] = key;
 		_values[id] = value;