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

LTA error message when multi sub exported out of a module fails to bind to an argument that happens to be a block #2370

Closed
p6rt opened this issue Feb 17, 2011 · 6 comments

Comments

@p6rt
Copy link

p6rt commented Feb 17, 2011

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

Searchable as RT84280$

@p6rt
Copy link
Author

p6rt commented Feb 17, 2011

From @masak

$ cat A.pm
module A;

sub foo(Str $a) is export {
}

multi sub bar(Str $a) is export {
}

$ perl6 -e 'use A; foo { 1 }'
Nominal type check failed for parameter '$a'; expected Str but got Block instead
  in 'A​::foo' at line 1​:A.pm
  in main program body at line 1

$ perl6 -e 'use A; bar { 1 }'
get_attr_str() not implemented in class 'Sub'
  in main program body at line 7461

@p6rt
Copy link
Author

p6rt commented Oct 20, 2011

From @jnthn

On Wed Feb 16 16​:21​:20 2011, masak wrote​:

$ cat A.pm
module A;

sub foo(Str $a) is export {
}

multi sub bar(Str $a) is export {
}

$ perl6 -e 'use A; foo { 1 }'
Nominal type check failed for parameter '$a'; expected Str but got
Block instead
in 'A​::foo' at line 1​:A.pm
in main program body at line 1

$ perl6 -e 'use A; bar { 1 }'
get_attr_str() not implemented in class 'Sub'
in main program body at line 7461

Works now​:

C​:\consulting\rakudo>perl6 -e "use A; bar { 1 }"
No applicable candidates found to dispatch to for 'bar'. Available
candidates are​:
:(Str $a)

/jnthn

@p6rt
Copy link
Author

p6rt commented Oct 20, 2011

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

@p6rt
Copy link
Author

p6rt commented Jan 25, 2015

From @usev6

I added a test to S11-modules/export.t with commit Raku/roast@3101a0468f

I'm closing this ticket now.

1 similar comment
@p6rt
Copy link
Author

p6rt commented Jan 25, 2015

From @usev6

I added a test to S11-modules/export.t with commit Raku/roast@3101a0468f

I'm closing this ticket now.

@p6rt p6rt closed this as completed Jan 25, 2015
@p6rt
Copy link
Author

p6rt commented Jan 25, 2015

@usev6 - Status changed from 'open' 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