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

Rakudo doesn't die when the same 'our sub' is defined twice in one package #2613

Closed
p6rt opened this issue Jan 17, 2012 · 4 comments
Closed
Labels

Comments

@p6rt
Copy link

p6rt commented Jan 17, 2012

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

Searchable as RT108462$

@p6rt
Copy link
Author

p6rt commented Jan 17, 2012

From @masak

<masak> perl6​: { our sub foo { say "OH HAI" } }; our &foo; foo
<p6eval> rakudo 0ac25d, niecza v13-296-g64527c0​: OUTPUT«OH HAI␤»
<masak> perl6​: { our sub foo { say "OH HAI" } }; { our sub foo { say
"OH HAI again" } }; our &foo; foo
<p6eval> ..niecza v13-296-g64527c0​: OUTPUT«===SORRY!===␤␤Two
definitions found for symbol :​:GLOBAL​::&foo␤␤ first at ??? line 0␤
second at ??? line 0 at /tmp/kEDMC3OaDH line 1​:␤------> b foo { say
"OH HAI" } }; { our sub foo ⏏{ say "OH HAI again" } }; our &foo; fo…
<p6eval> ..rakudo 0ac25d​: OUTPUT«OH HAI again␤»
<masak> rakudobug?
<TimToady> in fact, niecza++ is being very accurate in detecting two
*definitions*
* masak submits rakudobug

@p6rt
Copy link
Author

p6rt commented Jun 29, 2015

From @jnthn

On Tue Jan 17 11​:33​:52 2012, masak wrote​:

<masak> perl6​: { our sub foo { say "OH HAI" } }; our &foo; foo
<p6eval> rakudo 0ac25d, niecza v13-296-g64527c0​: OUTPUT«OH HAI␤»
<masak> perl6​: { our sub foo { say "OH HAI" } }; { our sub foo { say
"OH HAI again" } }; our &foo; foo
<p6eval> ..niecza v13-296-g64527c0​: OUTPUT«===SORRY!===␤␤Two
definitions found for symbol :​:GLOBAL​::&foo␤␤ first at ??? line 0␤
second at ??? line 0 at /tmp/kEDMC3OaDH line 1​:␤------> b foo { say
"OH HAI" } }; { our sub foo ⏏{ say "OH HAI again" } }; our &foo; fo…
<p6eval> ..rakudo 0ac25d​: OUTPUT«OH HAI again␤»
<masak> rakudobug?
<TimToady> in fact, niecza++ is being very accurate in detecting two
*definitions*
* masak submits rakudobug

Fixed this and various other missing redeclaration checks, and added test coverage for them in S32-exceptions/misc.t.

@p6rt
Copy link
Author

p6rt commented Jun 29, 2015

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

@p6rt
Copy link
Author

p6rt commented Jun 29, 2015

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

@p6rt p6rt closed this as completed Jun 29, 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