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

where-clause on capture does not work #5701

Closed
p6rt opened this issue Sep 28, 2016 · 4 comments
Closed

where-clause on capture does not work #5701

p6rt opened this issue Sep 28, 2016 · 4 comments

Comments

@p6rt
Copy link

p6rt commented Sep 28, 2016

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

Searchable as RT129430$

@p6rt
Copy link
Author

p6rt commented Sep 28, 2016

From @gfldex

sub f( |c where { c } ) {}; f 42

# OUTPUT«===SORRY!=== Error while compiling <tmp>␤Variable '&c' is not declared␤at <tmp>​:1␤------> sub f( |c where { ⏏c } ) {}; f 42␤»

# expected to work analog to

sub f( *@​a where { @​a } ) {}; f 42

@p6rt
Copy link
Author

p6rt commented Sep 28, 2016

From @jnthn

On Wed Sep 28 03​:23​:35 2016, gfldex wrote​:

sub f( |c where { c } ) {}; f 42

# OUTPUT«===SORRY!=== Error while compiling <tmp>␤Variable '&c' is not
declared␤at <tmp>​:1␤------> sub f( |c where { ⏏c } ) {}; f 42␤»

# expected to work analog to

sub f( *@​a where { @​a } ) {}; f 42

The declaration was happening a little too late. Fixed and added a test in S12-subset/subtypes.t.

/jnthn

@p6rt
Copy link
Author

p6rt commented Sep 28, 2016

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

@p6rt
Copy link
Author

p6rt commented Sep 28, 2016

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

@p6rt p6rt closed this as completed Sep 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant