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 barfs at undeclared &-sigilled variables #1533

Closed
p6rt opened this issue Feb 24, 2010 · 8 comments
Closed

Rakudo barfs at undeclared &-sigilled variables #1533

p6rt opened this issue Feb 24, 2010 · 8 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Feb 24, 2010

Migrated from rt.perl.org#73074 (status was 'rejected')

Searchable as RT73074$

@p6rt
Copy link
Author

p6rt commented Feb 24, 2010

From @masak

<masak> std​: &foo
<p6eval> std 29829​: OUTPUT«ok 00​:01 109m␤»
<masak> rakudo​: &foo
<p6eval> rakudo 59c65b​: OUTPUT«Symbol '&foo' not predeclared [...]
<masak> alpha​: &foo
<p6eval> alpha 30e0ed​: ( no output )
* masak submits rakudobug
<masak> proof of a regression in three simple steps :)

@p6rt
Copy link
Author

p6rt commented Feb 27, 2010

From @pmichaud

Now fixed in 4ab4b8. Now reports​:

&foo
Could not find non-existent sub &foo

Unlike the previous error message, this is a runtime error (that occurs
when the program attempts to access &foo and cannot find one). A test​:

say &foo; { our sub foo() { 1 } }
foo

Pm

@p6rt
Copy link
Author

p6rt commented Feb 27, 2010

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

@p6rt
Copy link
Author

p6rt commented Feb 27, 2010

From @masak

On Fri Feb 26 21​:02​:28 2010, pmichaud wrote​:

Now fixed in 4ab4b8. Now reports​:

&foo
Could not find non-existent sub &foo

Unlike the previous error message, this is a runtime error (that occurs
when the program attempts to access &foo and cannot find one).

It's still quite distinct from what alpha did, namely to return a Failure
when it didn't find a subroutine.

$ alpha -e 'say &foo.WHAT'
Failure()

Which behaviour is the correct one? Is this spec'd?

@p6rt
Copy link
Author

p6rt commented Feb 27, 2010

From @pmichaud

On Sat, Feb 27, 2010 at 02​:38​:29AM -0800, Carl Mäsak via RT wrote​:

Unlike the previous error message, this is a runtime error (that occurs
when the program attempts to access &foo and cannot find one).

It's still quite distinct from what alpha did, namely to return a Failure
when it didn't find a subroutine.

$ alpha -e 'say &foo.WHAT'
Failure()

Which behaviour is the correct one? Is this spec'd?

I'm not sure the desired behavior is spec'd yet. When it is,
we can update rakudo to match. :-)

Pm

@p6rt
Copy link
Author

p6rt commented Mar 6, 2010

From @moritz

I refuse ownership of this ticket because I have no idea how to write a
test for an unspecced feature.

@p6rt
Copy link
Author

p6rt commented Oct 6, 2010

From @masak

This ticket seems to have spec, spectests and implementation all blocking on each other.
Meanwhile, a bit of discussion on #perl6 reveals that STD.pm6 acutally takes a stand; it checks
whether there's a 'foo' sub declared if it encounters &foo at compile time.

Unfortunately, there's a bug in STD.pm6 such that exactly that check doesn't work at present. But
that doesn't concern this ticket; the behavior reported in this ticket is decidedly not a bug.

Rejecting ticket.

@p6rt
Copy link
Author

p6rt commented Oct 6, 2010

@masak - Status changed from 'open' to 'rejected'

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