Skip to content
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

[JVM] Calling .Str on &infix:<+> hits Mu::Str instead of Code::Str #5184

Open
usev6 opened this issue Feb 4, 2023 · 0 comments
Open

[JVM] Calling .Str on &infix:<+> hits Mu::Str instead of Code::Str #5184

usev6 opened this issue Feb 4, 2023 · 0 comments
Labels
JVM Related to Rakudo-JVM

Comments

@usev6
Copy link
Contributor

usev6 commented Feb 4, 2023

The Problem

The test for the string value of &infix:<+> in https://github.com/Raku/roast/blob/0d696f42a5/S03-operators/names.t#L14 started to fail on the JVM backend. (I don't know when it started to fail, but it used to work at least until 2022-10.)

Expected Behavior

The output of the following command should mention the operator name -- as it does on MoarVM:

$ ./rakudo-m -e 'say &infix:<+>.Str'
Sub+{is-pure} object coerced to string (please use .gist or .raku to do that)
  in block <unit> at -e line 1
infix:<+>

Actual Behavior

Only Sub+{is-pure} is mentioned on the JVM backend:

$ ./rakudo-j -e 'say &infix:<+>.Str'
Sub+{is-pure}<1891315145>

Additional Information

If I'm not mistaken, Mu::Str is hit instead of Code::Str. Explicitly calling the latter gives the expected result:

$ ./rakudo-j -e 'say &infix:<+>.Code::Str'
Sub+{is-pure} object coerced to string (please use .gist or .raku to do that)
  in block <unit> at -e line 1
infix:<+>

Environment

  • Operating system: FreeBSD 12.4-RELEASE
  • Compiler version (perl6 -v or raku -v): Welcome to Rakudo™ v2022.12-1130-g5ed14bc46.
    Implementing the Raku® Programming Language v6.d.
    Built on JVM.
@usev6 usev6 added the JVM Related to Rakudo-JVM label Feb 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
JVM Related to Rakudo-JVM
Projects
None yet
Development

No branches or pull requests

1 participant