Browse Source

Merge pull request #3105 from Atry/patch-8

Fix a C# compiler warning
Cauê Waneck 11 years ago
parent
commit
f1579c7a7d
1 changed files with 1 additions and 1 deletions
  1. 1 1
      std/cs/internal/Runtime.hx

+ 1 - 1
std/cs/internal/Runtime.hx

@@ -350,7 +350,7 @@ import cs.system.Type;
 			t = obj.GetType();
 			t = obj.GetType();
 			bf = System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.FlattenHierarchy;
 			bf = System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.FlattenHierarchy;
 		} else {
 		} else {
-			if (obj == typeof(string) && field.Equals("fromCharCode"))
+			if (t == typeof(string) && field.Equals("fromCharCode"))
 				return new haxe.lang.Closure(typeof(haxe.lang.StringExt), field, 0);
 				return new haxe.lang.Closure(typeof(haxe.lang.StringExt), field, 0);
 
 
 			obj = null;
 			obj = null;