Re: Problem documentation and/or compiler

2015-06-18 Thread Moritz Lenz
Hi Marcel, On 06/18/2015 11:17 AM, mt1957 wrote: Sorry I've been too fast, It's in the doc. However, why can't I assign it to a Buf with automatic coercion from utf8 to Buf which is more generic? The docs are wrong; it should be Blob, not Buf. I've fixed it in https://github.com/perl6/doc/com

Re: Problem documentation and/or compiler

2015-06-18 Thread mt1957
Sorry I've been too fast, It's in the doc. However, why can't I assign it to a Buf with automatic coercion from utf8 to Buf which is more generic? Marcel On 06/18/2015 11:12 AM, mt1957 wrote: L.s. At http://doc.perl6.org/type/Str#method_encode it says that string encoding returns a Buf. It

Problem documentation and/or compiler

2015-06-18 Thread mt1957
L.s. At http://doc.perl6.org/type/Str#method_encode it says that string encoding returns a Buf. It returns a utf8 instead see repl session below. > my Str $s = 'abcdef'; abcdef > my Buf $b = $s.encode; Type check failed in assignment to '$b'; expected 'Buf' but got 'utf8' in block at :1 M