diff --git a/macros/parserAssignment.pl b/macros/parserAssignment.pl index c3f0feaef7..4e2ec2baa7 100644 --- a/macros/parserAssignment.pl +++ b/macros/parserAssignment.pl @@ -347,7 +347,8 @@ package parser::Assignment::Formula; sub new { my $self = shift; $class = ref($self) || $self; my $f = $self->SUPER::new(@_); - bless $f, $class if $f->type eq 'Assignment'; + return $f unless $f->type eq 'Assignment'; + bless $f, $class; my $rhs = $f->getTypicalValue($f)->{data}[1]; Value->Error('Assignment of strings is not allowed.') if $rhs && $rhs->type eq 'String'; return $f;