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

Dynamic variable binding doesn't check for proper container #4625

Open
p6rt opened this issue Oct 6, 2015 · 2 comments
Open

Dynamic variable binding doesn't check for proper container #4625

p6rt opened this issue Oct 6, 2015 · 2 comments

Comments

@p6rt
Copy link

@p6rt p6rt commented Oct 6, 2015

Migrated from rt.perl.org#126278 (status was 'new')

Searchable as RT126278$

@p6rt

This comment has been minimized.

Copy link
Author

@p6rt p6rt commented Oct 6, 2015

From @ShimmerFairy

The broken behavior​:

<ShimmerFairy> m​: my @​*A := 42
<camelia> rakudo-moar bad9be​: ( no output )
<ShimmerFairy> m​: my %*A := 42
<camelia> rakudo-moar bad9be​: ( no output )
<ShimmerFairy> m​: my &*A := 42
<camelia> rakudo-moar bad9be​: ( no output )

The expected behavior​:

<ShimmerFairy> m​: my @​A := 42
<camelia> rakudo-moar bad9be​: OUTPUT«Type check failed in binding; expected Positional but got Int␤ in block <unit> at /tmp/T2aUUQrbL2​:1␤␤»
<ShimmerFairy> m​: my %A := 42
<camelia> rakudo-moar bad9be​: OUTPUT«Type check failed in binding; expected Associative but got Int␤ in block <unit> at /tmp/R8h3mTS3Ao​:1␤␤»
<ShimmerFairy> m​: my &A := 42
<camelia> rakudo-moar bad9be​: OUTPUT«Type check failed in binding; expected Callable but got Int␤ in block <unit> at /tmp/htfXw0lr56​:1␤␤»

Apparently rakudo's contextuals don't check binding to see if the object being bound is of the right type (Postional/Associative/Callable)

@p6rt

This comment has been minimized.

Copy link
Author

@p6rt p6rt commented Dec 1, 2017

From @bduggan

This problem is still reproducible.

$ perl6 -e 'my @​*A := 42'
$
$ perl6 --version
This is Rakudo version 2017.11 built on MoarVM version 2017.11 implementing Perl 6.c.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.