Skip to content

Commit f8a4781

Browse files
committed
Merge pull request #106908 from dsnopek/java-class-wrapper-object-type-bug
JavaClassWrapper: Don't discard overloaded methods that differ by object type
2 parents a6e296e + cc7f2e5 commit f8a4781

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

platform/android/java_class_wrapper.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1600,9 +1600,12 @@ Ref<JavaClass> JavaClassWrapper::_wrap(const String &p_class, bool p_allow_priva
16001600
if (_new != existing) {
16011601
this_valid = false;
16021602
break;
1603+
} else if ((_new == Variant::OBJECT || _new == Variant::ARRAY) && E->get().param_sigs[j] != mi.param_sigs[j]) {
1604+
this_valid = false;
1605+
break;
16031606
}
16041607
new_likeliness += new_l;
1605-
existing_likeliness = existing_l;
1608+
existing_likeliness += existing_l;
16061609
}
16071610

16081611
if (!this_valid) {

0 commit comments

Comments
 (0)