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

error 'Use of uninitialized $_ of type Any in numeric context" throws extra errors #2768

Closed
p6rt opened this issue May 18, 2012 · 6 comments
Closed

Comments

@p6rt
Copy link

p6rt commented May 18, 2012

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

Searchable as RT112986$

@p6rt
Copy link
Author

p6rt commented May 18, 2012

From @Siddhant

<sisar> r​: $_**2;
<p6eval> rakudo 45679a​: OUTPUT«use of uninitialized variable $_ of
type Any in numeric context  in block <anon> at /tmp/uUxfmOEKJJ​:1␤␤»
<sisar> that gives a different error locally
<sisar> it says "use of uninitialized variable $_ of type Any in
numeric contextMethod 'message' not found for invocant of class 'Any'
"
<moritz> the second half looks like an error during error reporting :/
<moritz> ah, you run it in the REPL
<sisar> yup
...
<moritz> but it's a bug that needs fixing
<moritz> r​: say ($_ ** 2).WHAT
<p6eval> rakudo 45679a​: OUTPUT«use of uninitialized variable $_ of
type Any in numeric context  in block <anon> at
/tmp/eWivcSD3YY​:1␤␤Int()␤»
<sisar> so should I report a rakudobug, or are you fixing it right now ?
<moritz> please report

@p6rt
Copy link
Author

p6rt commented Nov 21, 2012

From @FROGGS

thats the expected behaviour, right?

rakudo-2012-11$ install/bin/perl6

$_**2;
use of uninitialized variable $_ of type Any in numeric context
0

@p6rt
Copy link
Author

p6rt commented Nov 21, 2012

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

@p6rt
Copy link
Author

p6rt commented Aug 28, 2017

From @AlexDaniel

Currently it says this​:
Use of uninitialized value of type Any in numeric context
  in block <unit> at <unknown file> line 1

As well as complains about sink context in non-repl​:
Useless use of "**" in expression "$_**2" in sink context (line 1)

I see no problem with it. Except that it no longer says which variable caused the trouble. I guess it is less than awesome, but this part changed before 2014.01. I can't bisect there and it is irrelevant to this ticket.

I'll mark this as 「testneeded」 in case someone can come up with a test for this, but otherwise it is a resolved ticket.
On 2012-11-21 09​:53​:41, FROGGS.de wrote​:

thats the expected behaviour, right?

rakudo-2012-11$ install/bin/perl6

$_**2;
use of uninitialized variable $_ of type Any in numeric context
0

@p6rt
Copy link
Author

p6rt commented Feb 4, 2018

From @AlexDaniel

🍕 Test in rakudo/rakudo@4385e3f

On 2017-08-28 13​:58​:57, alex.jakimenko@​gmail.com wrote​:

Currently it says this​:
Use of uninitialized value of type Any in numeric context
in block <unit> at <unknown file> line 1

As well as complains about sink context in non-repl​:
Useless use of "**" in expression "$_**2" in sink context (line 1)

I see no problem with it. Except that it no longer says which variable
caused
the trouble. I guess it is less than awesome, but this part changed
before
2014.01. I can't bisect there and it is irrelevant to this ticket.

I'll mark this as 「testneeded」 in case someone can come up with a test
for
this, but otherwise it is a resolved ticket.
On 2012-11-21 09​:53​:41, FROGGS.de wrote​:

thats the expected behaviour, right?

rakudo-2012-11$ install/bin/perl6

$_**2;
use of uninitialized variable $_ of type Any in numeric context
0

@p6rt
Copy link
Author

p6rt commented Feb 4, 2018

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

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

No branches or pull requests

1 participant