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

Cannot redefine stubbed sub #3488

Closed
p6rt opened this issue Aug 25, 2014 · 5 comments
Closed

Cannot redefine stubbed sub #3488

p6rt opened this issue Aug 25, 2014 · 5 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Aug 25, 2014

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

Searchable as RT122613$

@p6rt
Copy link
Author

p6rt commented Aug 25, 2014

From krunen@gmail.com

krunen@​server​:~/src/rakudo$ ./perl6 -v
This is perl6 version 2014.08-6-gc793d80 built on MoarVM version
2014.08-37-g74883b4

krunen@​server​:~/src/rakudo$ ./perl6 -e "sub a{...}; sub a{42};"
===SORRY!=== Error while compiling -e
Redeclaration of routine a
at -e​:1

Had a look in Actions.nqp where the exception is thrown (line 2586++)​:

  if $outer.symbol($name) {
  $*W.throw($/, ['X', 'Redeclaration'],
  symbol => ~$<deflongname>.ast,
  what => 'routine',
  );
  }

There is no test for if the previous declaration was stubbed.

--
Rune Nilsen
+47 90856985

@p6rt
Copy link
Author

p6rt commented Oct 11, 2015

From @niner

Implemented in Rakudo commit rakudo/rakudo@d28c37dda9
Tests in roast​: Raku/roast@ce9d2a5f6a

@p6rt
Copy link
Author

p6rt commented Oct 11, 2015

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

@p6rt
Copy link
Author

p6rt commented Oct 11, 2015

From @niner

Marking resolved.

Thanks for the report and the hint on where to implement it!

@p6rt
Copy link
Author

p6rt commented Oct 11, 2015

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

@p6rt p6rt closed this as completed Oct 11, 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