Skip to content

Commit

Permalink
Perlito5 - java - add operation "PlObject * int"
Browse files Browse the repository at this point in the history
  • Loading branch information
fglock committed Oct 18, 2019
1 parent 47ef73a commit a13a978
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src5/lib/Perlito5/Java.pm
Expand Up @@ -834,13 +834,6 @@ sub to_native_int {
{
return to_native_int( $cond->{arguments}[0], $level, $java_type ) . " - " . to_native_int( $cond->{arguments}[1], $level, $java_type );
}
if ( $cond->{code} eq 'infix:<*>'
&& ( $cond->{arguments}[0]->isa( 'Perlito5::AST::Int' )
|| $cond->{arguments}[1]->isa( 'Perlito5::AST::Int' ) )
)
{
return to_native_int( $cond->{arguments}[0], $level, $java_type ) . " * " . to_native_int( $cond->{arguments}[1], $level, $java_type );
}

}

Expand Down
3 changes: 3 additions & 0 deletions src5/lib/Perlito5/Java/Runtime.pm
Expand Up @@ -3702,6 +3702,9 @@ EOT
))

, <<'EOT'
public PlObject mul(int v) {
return this.mul(new PlInt(v));
}
}
class PlScalarObject extends PlObject {
public PlScalarObject() {
Expand Down

0 comments on commit a13a978

Please sign in to comment.