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

Int.fmt fails for some non-standard Int values #4922

Open
p6rt opened this issue Dec 24, 2015 · 2 comments
Open

Int.fmt fails for some non-standard Int values #4922

p6rt opened this issue Dec 24, 2015 · 2 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Dec 24, 2015

Migrated from rt.perl.org#127017 (status was 'new')

Searchable as RT127017$

@p6rt
Copy link
Author

p6rt commented Dec 24, 2015

From zefram@fysh.org

(1 but 7).fmt("%02d")
P6opaque​: get_boxed_ref could not unbox for the representation '20'

Presumably the above should have returned "01", as do other uses of .fmt
on non-standard Ints​:

True.fmt("%02d")
01
(1 but "aaa").fmt("%02d")
01

-zefram

@p6rt p6rt added the Bug label Jan 5, 2020
@usev6
Copy link

usev6 commented Oct 6, 2023

As a status update: The internal error message for the first example is gone -- but there is still an error:

$ ./rakudo-m -e '(1 but 7).fmt("%02d")'
Directive d not applicable for value of type Int+{<anon|1>}
  in block <unit> at -e line 1

The other two examples didn't change:

$ ./rakudo-m -e 'say True.fmt("%02d")'
01
$ ./rakudo-m -e 'say (1 but "aaa").fmt("%02d")'
01

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants