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

Maybe prefix:<~> should have a warning just like prefix:<+> does on undefined values in Rakudo #1621

Closed
p6rt opened this issue Mar 23, 2010 · 5 comments

Comments

@p6rt
Copy link

p6rt commented Mar 23, 2010

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

Searchable as RT73768$

@p6rt
Copy link
Author

p6rt commented Mar 23, 2010

From @masak

<masak> rakudo​: say ~(my $a)
<p6eval> rakudo db0f85​: OUTPUT«Any()␤»
<masak> moritz_​: were you saying this should generate a warning?
<moritz_> masak​: I think so... the specs are rather quiet on warnings
* masak submits rakudobug
<masak> Justin Case.
<moritz_> rakudo​: say +(my $a)
<p6eval> rakudo db0f85​: OUTPUT«Use of type object as value in numeric
context [...]
* moritz_ tries to remove that error altogether
<masak> I think it'd merit a warning, but not an error.
<moritz_> the current implementation tries to be very clever
<moritz_> it does a FAIL()
<moritz_> but the coercion to Int on the failure object immediatly
throws the exception that's supposed to remain unthrown for now

@p6rt
Copy link
Author

p6rt commented Oct 8, 2011

From @coke

On Tue Mar 23 08​:11​:23 2010, masak wrote​:

<masak> rakudo​: say ~(my $a)
<p6eval> rakudo db0f85​: OUTPUT«Any()␤»
<masak> moritz_​: were you saying this should generate a warning?
<moritz_> masak​: I think so... the specs are rather quiet on warnings
* masak submits rakudobug
<masak> Justin Case.
<moritz_> rakudo​: say +(my $a)
<p6eval> rakudo db0f85​: OUTPUT«Use of type object as value in numeric
context [...]
* moritz_ tries to remove that error altogether
<masak> I think it'd merit a warning, but not an error.
<moritz_> the current implementation tries to be very clever
<moritz_> it does a FAIL()
<moritz_> but the coercion to Int on the failure object immediatly
throws the exception that's supposed to remain unthrown for now

15​:45 < [Coke]> rakudo​: say ~(my $a)
15​:45 <+p6eval> rakudo 012e26​: OUTPUT«Use of uninitialized value in
string
  context␤␤»
15​:46 < [Coke]> rakudo​: say +(my $a)
15​:46 <+p6eval> rakudo 012e26​: OUTPUT«Use of uninitialized value in
numeric
  context␤0␤»

We complain now.

need tests.
--
Will "Coke" Coleda

@p6rt
Copy link
Author

p6rt commented Oct 8, 2011

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

@p6rt
Copy link
Author

p6rt commented Feb 3, 2012

From @moritz

Now tested in t/spec/S32-basics/warn.t.

@p6rt
Copy link
Author

p6rt commented Feb 3, 2012

@moritz - 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