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

Losing type info in the bowels of MapIter #3245

Closed
p6rt opened this issue Oct 2, 2013 · 4 comments
Closed

Losing type info in the bowels of MapIter #3245

p6rt opened this issue Oct 2, 2013 · 4 comments

Comments

@p6rt
Copy link

p6rt commented Oct 2, 2013

Migrated from rt.perl.org#120071 (status was 'resolved')

Searchable as RT120071$

@p6rt
Copy link
Author

p6rt commented Oct 2, 2013

From @lizmat

A deleted entry in an array, returns it type object correctly when directly invoked, but a generic Any object when invoked through map. At least on parakudo, not sure about jakudo.

[14​:23​:32] <lizmat> r​: my Int @​a=^3; @​a[1]​:delete; @​a.map​:{say .WHAT.perl }; @​a[1].WHAT.perl.say # losing type info deep in the bowels of MapIter
[14​:23​:34] <camelia> rakudo 0808ac​: OUTPUT«Int␤Any␤Int␤Int␤»
[14​:24​:30] <lizmat> no more time to look at this now, maybe someone else has inspiration

[21​:40​:20] <lizmat_> r​: my Int @​a=^3; @​a[1]​:delete; @​a.map​:{say .WHAT.perl }; @​a[1].WHAT.perl.say # losing type info deep in the bowels of MapIter
[21​:40​:48] <+camelia> rakudo 0808ac​: OUTPUT«Int␤Any␤Int␤Int␤»
[21​:41​:02] <lizmat_> I guess I'm going to rakudobug this
[21​:41​:22] <lizmat_> unless someone has a suggestion?
[21​:43​:37] <masak> was the thing the other day rakudobugged? it was similar.
[21​:44​:19] <lizmat_> I think I told timotimo that I had an idea where it was coming from
[21​:44​:23] <lizmat_> but I was wrong
[21​:44​:31] <lizmat_> at least, in the short term

[12​:06​:07] <lizmat> Could someone run this on jakudo and tell me what it says? my Int @​a=^3; @​a[1]​:delete; @​a.map​:{ .WHAT.perl.say }; @​a[1].WHAT.perl.say
[12​:06​:33] <timotimo> nqp/master + rakudo/nom?
[12​:06​:56] <lizmat> doesn't really matter
[12​:07​:15] <lizmat> this is deep in MapIter, and that has specific versions for Parrot and JVM
[12​:08​:36] <jnthn> lizmat​:
[12​:08​:37] <jnthn> Int
[12​:08​:40] <jnthn> Any
[12​:08​:40] <jnthn> Int
[12​:08​:40] <jnthn> Int
[12​:08​:50] <timotimo> that's ... unfortunate
[12​:08​:51] <lizmat> ok, so same pb on jakudo
[12​:08​:56] <jnthn> (that's on cursless branch, but no MapIter changes there)
[12​:09​:01] <lizmat> indeed
[12​:09​:09] <lizmat> so the pb is in the non-VM specific code
[12​:09​:16] <lizmat> s/is/could be/

@p6rt
Copy link
Author

p6rt commented Oct 24, 2015

From @usev6

The type info for deleted elements is not lost anymore​:

$ perl6-m -e 'my Int @​a=^3; @​a[1]​:delete; @​a.map​:{say .WHAT.perl }; @​a[1].WHAT.perl.say'
Int
Int
Int
Int

I added a test to S09-typed-arrays/arrays.t with commit Raku/roast@4ec7087158

I'm closing this ticket as 'resolved'.

1 similar comment
@p6rt
Copy link
Author

p6rt commented Oct 24, 2015

From @usev6

The type info for deleted elements is not lost anymore​:

$ perl6-m -e 'my Int @​a=^3; @​a[1]​:delete; @​a.map​:{say .WHAT.perl }; @​a[1].WHAT.perl.say'
Int
Int
Int
Int

I added a test to S09-typed-arrays/arrays.t with commit Raku/roast@4ec7087158

I'm closing this ticket as 'resolved'.

@p6rt p6rt closed this as completed Oct 24, 2015
@p6rt
Copy link
Author

p6rt commented Oct 24, 2015

@usev6 - Status changed from 'new' to 'resolved'

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

No branches or pull requests

1 participant