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 do type checking on binding to Positional (@) variables #513

Closed
p6rt opened this issue Dec 20, 2008 · 9 comments
Closed

Rakudo doesn't do type checking on binding to Positional (@) variables #513

p6rt opened this issue Dec 20, 2008 · 9 comments

Comments

@p6rt
Copy link

p6rt commented Dec 20, 2008

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

Searchable as RT61566$

@p6rt
Copy link
Author

p6rt commented Dec 20, 2008

From @masak

<masak> rakudo​: my @​a := 1; say @​a.WHAT
<p6eval> rakudo 34162​: OUTPUT[Int␤]
<masak> hm.
<masak> rakudo​: my @​a = 1; say @​a.WHAT
<p6eval> rakudo 34162​: OUTPUT[Array␤]
<masak> so, with infix​:<​:=>, I can assign an Int to a @​-variable. is
that kosher? [22​:37]
<pmichaud> no. [22​:38]
<pmichaud> Rakudo doesn't do any type checking on binding.
<pmichaud> (binding in general is kinda 'iffy')
<masak> so, the bug above is that Rakudo doesn't do type checking on
binding to array variables?
<pmichaud> correct.
<pmichaud> you should get a "Int does not do Positional role"
exception or something like that.

@p6rt
Copy link
Author

p6rt commented Jan 11, 2009

@pmichaud - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Jan 11, 2009

@pmichaud - Status changed from 'open' to 'stalled'

@p6rt
Copy link
Author

p6rt commented Jul 13, 2009

From @kyleha

This is an automatically generated mail to inform you that tests are now available in b/t/spec/S03-operators/binding-arrays.t

@p6rt
Copy link
Author

p6rt commented Jul 13, 2009

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

@p6rt
Copy link
Author

p6rt commented Oct 16, 2011

From @coke

3 years or so, no change​:

10​:37 < [Coke]> rakudo​: my @​a = 1; say @​a.WHAT; say @​a.perl;
10​:37 <+p6eval> rakudo 25af2d​: OUTPUT«Array()␤Array.new(1)␤»
10​:37 < [Coke]> rakudo​: my @​a := 1; say @​a.WHAT; say @​a.perl;
10​:37 <+p6eval> rakudo 25af2d​: OUTPUT«Int()␤1␤»

--
Will "Coke" Coleda

@p6rt
Copy link
Author

p6rt commented Dec 5, 2011

From @jnthn

On Sun Oct 16 07​:38​:09 2011, coke wrote​:

3 years or so, no change​:

10​:37 < [Coke]> rakudo​: my @​a = 1; say @​a.WHAT; say @​a.perl;
10​:37 <+p6eval> rakudo 25af2d​: OUTPUT«Array()␤Array.new(1)␤»
10​:37 < [Coke]> rakudo​: my @​a := 1; say @​a.WHAT; say @​a.perl;
10​:37 <+p6eval> rakudo 25af2d​: OUTPUT«Int()␤1␤»

One little refactor, big change​:

my @​a = 1; say @​a.WHAT; say @​a.perl;
Array()
Array.new(1)
my @​a := 1; say @​a.WHAT; say @​a.perl;
Type check failed in binding

Test needed.

/jnthn

@p6rt
Copy link
Author

p6rt commented Jan 6, 2012

From @moritz

tested in S03-operators/binding-arrays.t.

@p6rt
Copy link
Author

p6rt commented Jan 6, 2012

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

@p6rt p6rt closed this as completed Jan 6, 2012
@p6rt p6rt added the testneeded label Jan 5, 2020
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