eo
eo copied to clipboard
As-bytes conversion to EO, does it work?
I have a simple program:
[] > app
QQ.io.stdout > @
QQ.txt.sprintf "result is %d\n"
-1.times 228
I covert it to xmir
using Syntax.java
, and I get:
<objects>
<o abstract="" name="app" pos="0">
<o base=".stdout" name="@">
<o base=".io" >
<o base="QQ"/>
</o>
<o base=".sprintf">
<o base=".txt" >
<o base="QQ"/>
</o>
<o base="string" data="string">result is %d\n</o>
<o base=".times">
<o base="int" data="bytes">FF FF FF FF FF FF FF FF</o>
<o base="int" data="bytes">00 00 00 00 00 00 00 E4</o>
</o>
</o>
</o>
</o>
</objects>
After that I convert it Again to eo
via XMIR.java
and I get the strange result instead of -1
:
[] > app
QQ
.io
.stdout > @
QQ
.txt
.sprintf
"result is %d\n"
18446744073709551615
.times
228
@MikhailLipanin I think it's a bug in XMIR
class. @Graur can you please take a look?
@yegor256 Sure, I will check it
@Graur, Can you fix this one?
Because of this, I can't run this test.
There is -1.times x
@Graur any updates here?
@MikhailLipanin @yegor256 I added test from the issue and XMIRTest.java
test passed. This test compare two EO files before and after converting it to XMIR and back to EO. You can check it here: #2083.