Skip Menu |
Report information
Id: 124444
Status: open
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: lembark [at] wrkhors.com
Cc:
AdminCc:

Severity: (no value)
Tag: (no value)
Platform: (no value)
Patch Status: (no value)
VM: (no value)



CC: lembark [...] wrkhors.com
To: rakudobug [...] perl.org
From: Steven Lembark <lembark [...] wrkhors.com>
Date: Sat, 2 May 2015 14:04:43 -0500
Subject: t/spec/S03-smartmatch/array-hash.t failes with "Type check failed"
Download (untitled) / with headers
text/plain 1001b
$ git describe Vladivostok-139-g95411f5 Test fails from the command line: $ prove -v -e t/fudgeandrun t/spec/S03-smartmatch/array-hash.t; Type check failed in binding &call; expected 'Callable' but got 'Method+{<anon>}' in block <unit> at t/spec/S03-smartmatch/array-hash.t:8 Checking the the REPL, comparing array and hash literals works: $ perl6; Show quoted text
> <a> ~~ { a => 'b', c => Mu }
True This fails with a variable, however: Show quoted text
> my %h = (a => 'b', c => Mu);
a => b, c => (Mu) Show quoted text
> %h.perl
{:a("b"), :c(Mu)}<> Show quoted text
> ['a'] ~~ %h
use of uninitialized value of type Any in numeric context Type check failed in binding &call; expected 'Callable' but got 'Method+{<anon>}' in block <unit> at <unknown file>:1 #NYPerlHackathon -- Steven Lembark 3646 Flora Pl Workhorse Computing St Louis, MO 63110 lembark@wrkhors.com +1 888 359 3508
RT-Send-CC: perl6-compiler [...] perl.org
Download (untitled) / with headers
text/plain 1.1k
On Sat May 02 12:04:46 2015, lembark@wrkhors.com wrote: Show quoted text
> $ git describe > Vladivostok-139-g95411f5 > > Test fails from the command line: > > $ prove -v -e t/fudgeandrun t/spec/S03-smartmatch/array-hash.t; > Type check failed in binding &call; expected 'Callable' but got > 'Method+{<anon>}' > in block <unit> at t/spec/S03-smartmatch/array-hash.t:8 > > Checking the the REPL, comparing array and hash literals works: > > $ perl6; >
> > <a> ~~ { a => 'b', c => Mu }
> True > > This fails with a variable, however: >
> > my %h = (a => 'b', c => Mu);
> a => b, c => (Mu)
> > %h.perl
> {:a("b"), :c(Mu)}<> >
> > ['a'] ~~ %h
> use of uninitialized value of type Any in numeric context > Type check failed in binding &call; expected 'Callable' but got > 'Method+{<anon>}' > in block <unit> at <unknown file>:1
Just a note: AFAIU this has nothing to do with the RHS (variable or hash literal), but with the LHS (scalar or array/list): $ perl6 -e 'say <a>.WHAT; say <a> ~~ {a => "b", c => Mu};' (Str) True $ perl6 -e 'say ["a"].WHAT; say ["a"] ~~ {a => "b", c => Mu};' (Array) Type check failed in binding &call; expected Callable but got Method+{<anon|64178112>} in block <unit> at -e:1


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org