# New Ticket Created by  raiph 
# Please include the string:  [perl #127443]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=127443 >


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.

What I did
==========

my Int $a;
my $b = 42;
$a := $b;
$b = "not Int";
say $a;
$a = "not Int";
say $a;
$a := "not Int";

What I got
==========

not cool
not cool
Type check failed in binding; expected Int but got Str
  in block <unit> at -e line 1

What I "expected"
=================

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

Reply via email to