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

Bug in Perl6::Metamodel::Naming method set_name. CArray[Pointer].^shortname returns 'Pointer]'; should be 'CArray[Pointer]' #6295

Closed
p6rt opened this issue May 31, 2017 · 6 comments

Comments

@p6rt
Copy link

p6rt commented May 31, 2017

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

Searchable as RT131406$

@p6rt
Copy link
Author

p6rt commented May 31, 2017

From @raiph

put $*PERL.compiler.version; # 2017.05.303.g.5.e.3393454

use NativeCall; put CArray[Pointer].^shortname;

displays 'Pointer]' instead of expected 'CArray[Pointer]' or similar.

The 'CArray' is missing and so is the expected open square bracket.

timotimo++ noted that this is a problem in the
Perl6​::Metamodel​::Naming method set_name, specifically the lines​:

my @​parts := nqp​::split('​::', $name);
...
$!shortname := @​parts ?? @​parts[nqp​::elems(@​parts) - 1] !! '';

See https://irclog.perlgeek.de/perl6/2017-05-30#i_14662809 for some
investigation into which commit appeared to introduce this bug.

@p6rt
Copy link
Author

p6rt commented May 31, 2017

From @raiph

See https://irclog.perlgeek.de/perl6/2017-05-30#i_14662809 for some investigation into which commit appeared to introduce this bug.

Which yields rakudo/rakudo@518b46f

which suggests this code is part of the problem​:

$what.^set_name("{arr.^name}[{t.^name}]");

At a first glance it seems set_name expects a single type name and chokes when it's given two.

@p6rt
Copy link
Author

p6rt commented May 31, 2017

From @lizmat

Fixed with 1ed284e2953382744b02058a , tests needed.

On 31 May 2017, at 04​:20, raiph (via RT) <perl6-bugs-followup@​perl.org> wrote​:

# New Ticket Created by raiph
# Please include the string​: [perl #​131406]
# in the subject line of all future correspondence about this issue.
# <URL​: https://rt-archive.perl.org/perl6/Ticket/Display.html?id=131406 >

put $*PERL.compiler.version; # 2017.05.303.g.5.e.3393454

use NativeCall; put CArray[Pointer].^shortname;

displays 'Pointer]' instead of expected 'CArray[Pointer]' or similar.

The 'CArray' is missing and so is the expected open square bracket.

timotimo++ noted that this is a problem in the
Perl6​::Metamodel​::Naming method set_name, specifically the lines​:

my @​parts := nqp​::split('​::', $name);
...
$!shortname := @​parts ?? @​parts[nqp​::elems(@​parts) - 1] !! '';

See https://irclog.perlgeek.de/perl6/2017-05-30#i_14662809 for some
investigation into which commit appeared to introduce this bug.

@p6rt
Copy link
Author

p6rt commented May 31, 2017

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Dec 11, 2017

From @zoffixznet

Tests​: rakudo/rakudo@831dab1422

@p6rt
Copy link
Author

p6rt commented Dec 11, 2017

@zoffixznet - Status changed from 'open' to 'resolved'

@p6rt p6rt closed this as completed Dec 11, 2017
@p6rt p6rt added the testneeded label Jan 5, 2020
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