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

Constraint on a slurpy MAIN parameter leaks out internal exceptions #5262

Closed
p6rt opened this issue Apr 24, 2016 · 7 comments
Closed

Constraint on a slurpy MAIN parameter leaks out internal exceptions #5262

p6rt opened this issue Apr 24, 2016 · 7 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Apr 24, 2016

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

Searchable as RT127977$

@p6rt
Copy link
Author

p6rt commented Apr 24, 2016

From @tadzik

$ cat test.pl
sub MAIN(@​args where sub { False }) {
  say "​:)"
}

$ perl6 test.pl
Usage​:
  test.pl <args>

$ cat test.pl # note the slurpy
sub MAIN(*@​args where sub { False }) {
  say "​:)"
}

$ perl6 test.pl
Constraint type check failed for parameter '@​args'
  in sub MAIN at test.pl line 1
  in block <unit> at test.pl line 1


I expect USAGE in both cases, since it's both exactly invalid use of MAIN.
Patch and spectest incoming.

@p6rt
Copy link
Author

p6rt commented Apr 24, 2016

From @tadzik

https://github.com/rakudo/rakudo/tree/rt-127977 contains a fix for that

On 24/04/16 12​:28, perl6 via RT wrote​:

Greetings,

This message has been automatically generated in response to the
creation of a trouble ticket regarding​:
"[BUG] Constraint on a slurpy MAIN parameter leaks out internal exceptions",
a summary of which appears below.

There is no need to reply to this message right now. Your ticket has been
assigned an ID of [perl #​127977].

Please include the string​:

      \[perl #&#8203;127977\]

in the subject line of all future correspondence about this issue. To do so,
you may reply to this message.

                     Thank you,
                     perl6\-bugs\-followup@&#8203;perl\.org

-------------------------------------------------------------------------
$ cat test.pl
sub MAIN(@​args where sub { False }) {
say "​:)"
}

$ perl6 test.pl
Usage​:
test.pl <args>

$ cat test.pl # note the slurpy
sub MAIN(*@​args where sub { False }) {
say "​:)"
}

$ perl6 test.pl
Constraint type check failed for parameter '@​args'
in sub MAIN at test.pl line 1
in block <unit> at test.pl line 1

--------------------------------------------------

I expect USAGE in both cases, since it's both exactly invalid use of MAIN.
Patch and spectest incoming.

@p6rt
Copy link
Author

p6rt commented Apr 29, 2016

From @usev6

For the records​: There is a test for this ticket (currently fudged 'todo') in S06-other/main-usage.t

1 similar comment
@p6rt
Copy link
Author

p6rt commented Apr 29, 2016

From @usev6

For the records​: There is a test for this ticket (currently fudged 'todo') in S06-other/main-usage.t

@p6rt
Copy link
Author

p6rt commented Jul 6, 2016

From @zoffixznet

The test now passes. It was fixed today by one of these commits​: rakudo/rakudo@774e2de...41b685e

Not sure which exactly, I only I ran spectest ~10 hours ago and the TODO test wasn't passing.

@p6rt
Copy link
Author

p6rt commented Jul 6, 2016

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

@p6rt
Copy link
Author

p6rt commented Jul 6, 2016

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

@p6rt p6rt closed this as completed Jul 6, 2016
@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