File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -348,9 +348,20 @@ 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
356+ sub typeMatch {
357+ my $self = shift ; my $other = shift ; my $ans = shift ;
358+ return 0 unless $self -> type eq $other -> type;
359+ my $typeMatch = $self -> getTypicalValue($self )-> {data }[1];
360+ $other = $self -> getTypicalValue($other ,1)-> {data }[1];
361+ return 1 unless defined ($other ); # can't really tell, so don't report type mismatch
362+ $typeMatch -> typeMatch($other ,$ans );
363+ }
364+
354365sub cmp_class {
355366 my $self = shift ; my $value ;
356367 if ($self -> {tree }{rop }{isConstant }) {
You can’t perform that action at this time.
0 commit comments