[libinline-java-perl] 186/398: Fixed bug with members that have the same name.
Jonas Smedegaard
dr at jones.dk
Thu Feb 26 11:43:02 UTC 2015
This is an automated email from the git hooks/post-receive script.
js pushed a commit to tag 0.55
in repository libinline-java-perl.
commit 6573508cde920df5db2c6ecccb7bd7aa9a1aec95
Author: patrick_leb <>
Date: Wed Mar 13 17:03:06 2002 +0000
Fixed bug with members that have the same name.
---
Java/Object.pm | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/Java/Object.pm b/Java/Object.pm
index e3c6c96..c59b2a8 100644
--- a/Java/Object.pm
+++ b/Java/Object.pm
@@ -244,11 +244,14 @@ sub __get_member {
my $types = $fields->{$key} ;
if ($types){
- my @typesk = keys %{$types} ;
-
# We take the last one, which is more specific. Eventually
# we should use a scoring method just like for the methods
- my $sign = $types->{$typesk[-1]} ;
+ my $sign = undef ;
+ foreach my $s (values %{$types}){
+ if ((! defined($sign))||($s->{IDX} > $sign->{IDX})){
+ $sign = $s ;
+ }
+ }
my $proto = $sign->{TYPE} ;
@@ -278,11 +281,14 @@ sub __set_member {
my $types = $fields->{$key} ;
if ($types){
- my @typesk = keys %{$types} ;
-
# We take the last one, which is more specific. Eventually
# we should use a scoring method just like for the methods
- my $sign = $types->{$typesk[-1]} ;
+ my $sign = undef ;
+ foreach my $s (values %{$types}){
+ if ((! defined($sign))||($s->{IDX} > $sign->{IDX})){
+ $sign = $s ;
+ }
+ }
my $proto = $sign->{TYPE} ;
my $new_args = undef ;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libinline-java-perl.git
More information about the Pkg-perl-cvs-commits
mailing list