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

redeclaration of a type in a function signature does not parsefail. #3706

Closed
p6rt opened this issue Feb 26, 2015 · 4 comments
Closed

redeclaration of a type in a function signature does not parsefail. #3706

p6rt opened this issue Feb 26, 2015 · 4 comments

Comments

@p6rt
Copy link

@p6rt p6rt commented Feb 26, 2015

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

Searchable as RT123939$

@p6rt
Copy link
Author

@p6rt p6rt commented Feb 26, 2015

From the.ashleydev+rt.cpan.org@gmail.com

(11​:17) < TimToady> m​: sub foo(​::T $f, :​:T $g) { say T }; foo(1,"foo")
(11​:17) <+camelia> rakudo-moar 3607d7​: OUTPUT«(Str)␤»
(11​:18) < TimToady> that should probably parsefail as a redeclaration of T

http://irclog.perlgeek.de/perl6/2015-02-26#i_10185616

Note the following discussion where similar cases are caught by the type checker just not the redeclaration of :​:T.

Loading

@p6rt
Copy link
Author

@p6rt p6rt commented Mar 1, 2015

From @Mouq

This bug was fixed in Rakudo commit​:

commit c8ac15be78ea166ece522b239c7f5899d2e373b7
Author​: Moritz Lenz <moritz@​faui2k3.org>
Date​: Fri Feb 27 06​:53​:44 2015 +0100

  Throw redeclaration error for duplicate type capture

Tests were added in Roast commit​:

commit 9c177595c2c565d21d980c79067608d98250cc67
Author​: TimToady <larry@​wall.org>
Date​: Thu Feb 26 11​:38​:58 2015 -0800

  add tests for dup parameter names including :​:T

Closing this ticket as resolved :)

On Thu Feb 26 11​:26​:57 2015, the.ashleydev+rt.cpan.org@​gmail.com wrote​:

(11​:17) < TimToady> m​: sub foo(​::T $f, :​:T $g) { say T }; foo(1,"foo")
(11​:17) <+camelia> rakudo-moar 3607d7​: OUTPUT«(Str)␤»
(11​:18) < TimToady> that should probably parsefail as a redeclaration
of T

http://irclog.perlgeek.de/perl6/2015-02-26#i_10185616

Note the following discussion where similar cases are caught by the
type checker just not the redeclaration of :​:T.

Loading

@p6rt
Copy link
Author

@p6rt p6rt commented Mar 1, 2015

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

Loading

@p6rt p6rt closed this Mar 1, 2015
@p6rt
Copy link
Author

@p6rt p6rt commented Mar 1, 2015

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

Loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant