From 448621867f02e8c284f9c4224943932f8d171210 Mon Sep 17 00:00:00 2001 From: Glenn Rice Date: Mon, 27 Dec 2021 21:09:19 -0600 Subject: [PATCH] Fix an issue introduced by #609 in which equations parsed in PGML via `[:: ::]` now fail to parse. --- macros/parserAssignment.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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;