diff options
author | goodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2004-05-11 00:17:06 +0000 |
---|---|---|
committer | goodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2004-05-11 00:17:06 +0000 |
commit | a2ecfffdd186e92dcd99b4fbd3b6e79225879ef0 (patch) | |
tree | 140867287908685341e1652383e7e8b09a55ec12 /lib/sbin/interface_parser.pl | |
parent | ebb31252932093fffd0a1f224e07d32ae8d11f87 (diff) |
Patch from Yaakoub to grive warning if a variable and the group it is in
have the same name, which could cause problems for IO thorns.
Goes some way to solving PR 1328, although it doesn't cover the case where
we have a variable named the same as another group in the thorn's scope, which
would need to be checked thouroughly at the consistency checking phase.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3715 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib/sbin/interface_parser.pl')
-rw-r--r-- | lib/sbin/interface_parser.pl | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/sbin/interface_parser.pl b/lib/sbin/interface_parser.pl index 5ff969e9..7c81f205 100644 --- a/lib/sbin/interface_parser.pl +++ b/lib/sbin/interface_parser.pl @@ -989,6 +989,11 @@ sub parse_interface_ccl @functions = split(/[^a-zA-Z_0-9]+/, $data[$line_number]); foreach $function (@functions) { + if ($function eq $current_group) + { + &CST_error(1,"Group and variable $function in thorn $thorn should be distinct",'', + __LINE__,__FILE__); + } $function =~ s:\s*::g; if($function =~ m:[^\s]+:) |