[perl #130502] [LTA] error message complains too much about Metamodel.nqp (Buf.new('0'))

2018-03-10 Thread Jan-Olof Hendig via RT
On Wed, 04 Jan 2017 14:21:15 -0800, alex.jakime...@gmail.com wrote:
> Code:
> say Buf.new('0')
> 
> Result:
> Type check failed in initializing element #0 to Buf; expected uint8
> but got Str ("0")
>   in any  at gen/moar/Metamodel.nqp line 1727
>   in block  at /tmp/9PmeQTevmg line 1
> 
> Actually thrown at:
>   in any  at gen/moar/Metamodel.nqp line 3072
>   in any  at gen/moar/Metamodel.nqp line 1727
> in block  at /tmp/9PmeQTevmg line 1
> 
> 

Fixed with commit 
https://github.com/rakudo/rakudo/commit/f230224d27bb6d47746de836113b07bf9a4ebcc0
> 
> It points three times to a line in Metamodel.nqp, and only once to the
> actual user file. Perhaps there is a way to improve it? Maybe not just
> for this case, but for any exception?



[perl #130502] [LTA] error message complains too much about Metamodel.nqp (Buf.new('0'))

2017-01-04 Thread via RT
# New Ticket Created by  Aleks-Daniel Jakimenko-Aleksejev 
# Please include the string:  [perl #130502]
# in the subject line of all future correspondence about this issue. 
# https://rt.perl.org/Ticket/Display.html?id=130502 >


Code:
say Buf.new('0')

Result:
Type check failed in initializing element #0 to Buf; expected uint8 but got Str 
("0")
  in any  at gen/moar/Metamodel.nqp line 1727
  in block  at /tmp/9PmeQTevmg line 1

Actually thrown at:
  in any  at gen/moar/Metamodel.nqp line 3072
  in any  at gen/moar/Metamodel.nqp line 1727
in block  at /tmp/9PmeQTevmg line 1



It points three times to a line in Metamodel.nqp, and only once to the actual 
user file. Perhaps there is a way to improve it? Maybe not just for this case, 
but for any exception?