Przeglądaj źródła

[jvm] ignore synthetic methods when looking for fields in reflection

see #9221
Simon Krajewski 5 lat temu
rodzic
commit
720055b17c
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      std/jvm/Jvm.hx

+ 1 - 1
std/jvm/Jvm.hx

@@ -291,7 +291,7 @@ class Jvm {
 			while (cl != null) {
 				var methods = cl.getMethods();
 				for (m in methods) {
-					if (m.getName() == name) {
+					if (m.getName() == name && !m.isSynthetic()) {
 						var context = null;
 						if (!isStatic || cl == cast java.lang.Class) {
 							context = obj;