File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -348,17 +348,16 @@ sub new {
348348 my $self = shift ; $class = ref ($self ) || $self ;
349349 my $f = $self -> SUPER::new(@_ );
350350 bless $f , $class if $f -> type eq ' Assignment' ;
351+ my $rhs = $f -> getTypicalValue($f )-> {data }[1];
352+ Value-> Error(' Assignment of strings is not allowed.' ) if $rhs && $rhs -> type eq ' String' ;
351353 return $f ;
352354}
353355
354356sub typeMatch {
355357 my $self = shift ; my $other = shift ; my $ans = shift ;
356358 return 0 unless $self -> type eq $other -> type;
357- $other = $other -> Package(" Formula" )-> new($self -> context,$other ) unless $other -> isFormula;
358- my $typeMatch = ($self -> createRandomPoints(1))[1]-> [0]{data }[1];
359- $main::__other__ = sub {($other -> createRandomPoints(1))[1]-> [0]{data }[1]};
360- $other = main::PG_restricted_eval(' &$__other__()' );
361- delete $main ::{__other__ };
359+ my $typeMatch = $self -> getTypicalValue($self )-> {data }[1];
360+ $other = $self -> getTypicalValue($other ,1)-> {data }[1];
362361 return 1 unless defined ($other ); # can't really tell, so don't report type mismatch
363362 $typeMatch -> typeMatch($other ,$ans );
364363}
You can’t perform that action at this time.
0 commit comments