Log Message:
-----------
Fixed an accidental hard-coded operation from always being "add" to
being the correct operation when promoting the operations to an object
of higher precedence. (But since formulas are normally the highest
precedence, this will never have occurred.)
Modified Files:
--------------
pg/lib/Value:
Formula.pm
Revision Data
-------------
Index: Formula.pm
===================================================================
RCS file: /webwork/cvs/system/pg/lib/Value/Formula.pm,v
retrieving revision 1.21
retrieving revision 1.22
diff -Llib/Value/Formula.pm -Llib/Value/Formula.pm -u -r1.21 -r1.22
--- lib/Value/Formula.pm
+++ lib/Value/Formula.pm
@@ -64,7 +64,8 @@
#
sub bop {
my ($bop,$l,$r,$flag) = @_;
- if ($l->promotePrecedence($r)) {return $r->add($l,!$flag)}
+ my $call = $$Value::context->{method}{$bop};
+ if ($l->promotePrecedence($r)) {return $r->$call($l,!$flag)}
if ($flag) {my $tmp = $l; $l = $r; $r = $tmp}
my $formula = $pkg->blank; my $parser = $formula->{context}{parser};
my $vars = {};
|