diff options
author | goodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2004-08-17 18:48:40 +0000 |
---|---|---|
committer | goodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2004-08-17 18:48:40 +0000 |
commit | 530350ddb22ebda8211c920e127a842660161e9e (patch) | |
tree | cbf45b25bb1073eb4e70eb77abeba647517c396f /lib | |
parent | ed3f374e959ac4a753ae026af2765ffa7cdc9cda (diff) |
Detect if an inherited variable has the same name as a locally declared
one in an interface.ccl file.
Patch from Yaakoub.
Fixes PR 821.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3835 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib')
-rw-r--r-- | lib/sbin/interface_parser.pl | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/lib/sbin/interface_parser.pl b/lib/sbin/interface_parser.pl index d390cda5..cc8d7985 100644 --- a/lib/sbin/interface_parser.pl +++ b/lib/sbin/interface_parser.pl @@ -638,9 +638,24 @@ sub check_interface_consistency { if ($interface_data{"\U$ancestor_thorn\E PUBLIC GROUPS"} =~ m:([\^\s]+$private_group[$\s]+):) { - $message = "Private group $private_group in thorn $thorn has same name as \n public group in ancestor implementation $ancestor_imp (e.g. thorn $ancestor_thorn)"; + $message = "Private group $private_group in thorn $thorn has same name as \n public group in ancestor implementation $ancestor_imp (i.e. thorn $ancestor_thorn)"; &CST_error(0,$message,"",__LINE__,__FILE__); } + foreach $var (split " ", $interface_data{"\U$thorn\E GROUP \U$private_group\E"}) + { + foreach $pub_anc(split " ", $interface_data{"\U$ancestor_thorn\E PUBLIC GROUPS"}) + { + if ($interface_data{"\U$ancestor_thorn\E GROUP \U$pub_anc\E"} =~ /$var/i) + { + $message = "Private variable $var in group $private_group in thorn $thorn has same name as \n a variable in public group: $pub_anc in ancestor implementation $ancestor_imp (i.e. thorn $ancestor_thorn)"; + &CST_error(0,$message,"",__LINE__,__FILE__); + } + + } + + + } + } } } |