Skip to content

Commit

Permalink
bug(#3300): bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
maxonfjvipon committed Feb 6, 2025
1 parent c44f0e6 commit 198152e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion eo-runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ SOFTWARE.
<phase>generate-test-sources</phase>
<goals>
<goal>register</goal>
<goal>compile</goal>
<goal>assemble</goal>
<goal>xmir-to-phi</goal>
<goal>phi-to-xmir</goal>
<goal>transpile</goal>
Expand Down
16 changes: 8 additions & 8 deletions eo-runtime/src/main/eo/org/eolang/bytes.eo
Original file line number Diff line number Diff line change
Expand Up @@ -49,41 +49,41 @@
negative-infinity
if.
size.eq 8
number ^
number $
error
sprintf
"Can't convert non 8 length bytes to a number, bytes are %x"
* ^
* $
# Turn this chain of eight bytes into a i64 number.
# If there are less or more than eight bytes, there will
# be an error returned.
if. > as-i64
size.eq 8
i64 ^
i64 $
error
sprintf
"Can't convert non 8 length bytes to i64, bytes are %x"
* ^
* $
# Turn this chain of four bytes into a i32 number.
# If there are less or more than four bytes, there will
# be an error returned.
if. > as-i32
size.eq 4
i32 ^
i32 $
error
sprintf
"Can't convert non 4 length bytes to i32, bytes are %x"
* ^
* $
# Turn this chain of two bytes into a i16 number.
# If there are less or more than two bytes, there will
# be an error returned.
if. > as-i16
size.eq 2
i16 ^
i16 $
error
sprintf
"Can't convert non 2 length bytes to i16, bytes are %x"
* ^
* $

# Equals to another object.
# A condition where two objects have the same value or content.
Expand Down
2 changes: 1 addition & 1 deletion eo-runtime/src/main/java/org/eolang/PhDefault.java
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ public String locator() {
public String forma() {
final String name = this.oname();
final String form;
if (PhDefault.class.getName().equals(name)) {
if (PhDefault.class.getSimpleName().equals(name)) {
form = "[]";
} else {
form = String.join(
Expand Down

0 comments on commit 198152e

Please sign in to comment.