diff options
author | goodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2004-08-17 19:48:35 +0000 |
---|---|---|
committer | goodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2004-08-17 19:48:35 +0000 |
commit | 663ae723623e4729a4c796bdb992409830d2495a (patch) | |
tree | 5daf4cf77e9bc62ae7ab7644169b81de780f432a /lib | |
parent | 530350ddb22ebda8211c920e127a842660161e9e (diff) |
Make it an error to try to change the default when extending or sharing a
parameter.
Patch from Yaakoub.
Fixes PR 1824.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3836 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib')
-rw-r--r-- | lib/sbin/parameter_parser.pl | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/sbin/parameter_parser.pl b/lib/sbin/parameter_parser.pl index 700db282..68dc9a88 100644 --- a/lib/sbin/parameter_parser.pl +++ b/lib/sbin/parameter_parser.pl @@ -457,6 +457,14 @@ sub parse_param_ccl &CST_error(0,$message,$hint,__LINE__,__FILE__); } } + if($block =~ m:SHARES:i) + { + if($data[$line_number] =~ m:\s*\}\s*([^\s].*)\s*:) + { + $message = "Cannot change default when sharing or extending variable: $variable in $thorn"; + &CST_error(0,$message,"",__LINE__,__FILE__); + } + } } } else |