-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
an object with bytes must have text content #77
Comments
@yegor256 I can work on this |
@yegor256 I think it's a valid XMIR. Consider the next code.
XMIR: <o base="string" name="x">
<o base="bytes"/>
</o> |
@maxonfjvipon I would make it an error. The right way to do it is this:
|
@yegor256 so you suggest to prohibit explicit usage of Since recently But the next case looks valid:
Yes, 99% will never write like this, but it's valid and dataizable Maybe it's a bug in EO, because now we have differences between how bytes with data is presented in EO(or PHI) and XMIR: PHI:
XMIR <o base="string">
<o base="bytes">
00-00-00-00 // no anonymous abstract object
</o>
</o> For now such presentation in XMIR is just more convenient than if we have one extra Java: new PhWith(
Ф.take("org.eolang.bytes").copy(),
0,
new PhDefault(new byte[] {...}) // also anonymous abstract object
) |
@maxonfjvipon I suggest we fix the XMIR, to make it aligned with phi |
This is not a valid XMIR:
An object with
base="org.eolang.bytes"
must havetext()
content. Let's create a new lint to check for this.The text was updated successfully, but these errors were encountered: