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

undefined value for a missing hash optional argument does not know its metaclass. #2001

Closed
p6rt opened this issue Aug 2, 2010 · 6 comments
Closed
Labels

Comments

@p6rt
Copy link

p6rt commented Aug 2, 2010

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

Searchable as RT76928$

@p6rt
Copy link
Author

p6rt commented Aug 2, 2010

From @cognominal

sub a( %h?) { say %h.HOW }; a();
Method 'HOW' not found for invocant of class 'Hash'

Also I would expect it to DWIM in a code like that

sub a( %h?, *%h1) { say "{%h.defined} {%h1.defined}"; say {%h, %h1}.keys };
a( :b );

--
cognominal stef

@p6rt
Copy link
Author

p6rt commented Oct 11, 2011

From @coke

On Mon Aug 02 05​:05​:56 2010, cognominal wrote​:

sub a( %h?) { say %h.HOW }; a();
Method 'HOW' not found for invocant of class 'Hash'

Also I would expect it to DWIM in a code like that

sub a( %h?, *%h1) { say "{%h.defined} {%h1.defined}"; say {%h,
%h1}.keys };
a( :b );

Different failure now​:

21​:04 < [Coke]> rakudo​: sub a( %h?) { say %h.HOW }; a();
21​:04 <+p6eval> rakudo 38907e​: OUTPUT«Method 'gist' not found for invocant of
  class 'Perl6​::Metamodel​::ClassHOW'␤ in sub say at
  src/gen/CORE.setting​:4957␤ in sub a at /tmp/W657PMmq2T​:1␤ in
  block <anon> at /tmp/W657PMmq2T​:1␤ in <anon> at
  /tmp/W657PMmq2T​:1␤»

--
Will "Coke" Coleda

@p6rt
Copy link
Author

p6rt commented Oct 11, 2011

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

@p6rt
Copy link
Author

p6rt commented Feb 27, 2013

From @timo

This seems correct now.

sub a( %h?) { say %h.HOW }; a();
Perl6​::Metamodel​::ClassHOW.new()

Is this closable?

@p6rt
Copy link
Author

p6rt commented Mar 12, 2015

From @Mouq

On Wed Feb 27 13​:08​:04 2013, timo wrote​:

This seems correct now.

sub a( %h?) { say %h.HOW }; a();
Perl6​::Metamodel​::ClassHOW.new()

Is this closable?

I think so :) A test was added in Roast commit e7442ea42. Closing as resolved :)

~Mouq

@p6rt
Copy link
Author

p6rt commented Mar 12, 2015

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

@p6rt p6rt closed this as completed Mar 12, 2015
@p6rt p6rt added the Bug label Jan 5, 2020
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

1 participant