Browse Source

Fix locate for Null<T> (#50)

Pascal Peridont 8 years ago
parent
commit
7445393e5d
1 changed files with 7 additions and 0 deletions
  1. 7 0
      other/memory/Memory.hx

+ 7 - 0
other/memory/Memory.hx

@@ -200,6 +200,13 @@ class Memory {
 	function getTypeNull( t : TType ) {
 		if( t.nullWrap != null )
 			return t.nullWrap;
+		for( t2 in types )
+			switch( t2.t ) {
+			case HNull(base) if( base == t.t ):
+				t.nullWrap = t2;
+				return t2;
+			default:
+			}
 		var r = new TType(types.length, HNull(t.t));
 		t.nullWrap = r;
 		types.push(r);