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?
to your account
Migrated from rt.perl.org#127443 (status was 'open')
Searchable as RT127443$
The text was updated successfully, but these errors were encountered:
Reporting an apparent bug pointed out by Christoph at http://stackoverflow.com/a/35002979/1077672
This is Rakudo version 2015.12-213-g770d109 built on MoarVM version 2015.12-29-g8079ca5
implementing Perl 6.c.
my Int $a;
my $b = 42;
$a := $b;
$b = "not Int";
$a = "not Int";
$a := "not Int";
Type check failed in binding; expected Int but got Str
in block <unit> at -e line 1
That $b's type constraints have to be the same as or more narrow than $a's type constraints for the binding `$a := $b` to succeed.
So something like:
===SORRY!=== Error while compiling ...
Type check failed in binding; expected Int but got Mu
Sorry, something went wrong.
Should of course have been:
Type check failed in binding; expected Int but got Str ("not Int")
Still present in today's Rakudo fa84f1
ZZ | https://twitter.com/zoffix
@coke - Status changed from 'new' to 'open'
Successfully merging a pull request may close this issue.