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


> my $a = 3
3
> my $b = $a.VAR
3
> $b.WHAT.say
(Scalar)
> $a.abs
3
> $b.abs
Method 'abs' not found for invocant of class 'Int'
  in block <unit> at <unknown file> line 1

There is no "abs" method on Scalar, but there is on Int.  The error
message is presumably correct in saying that the method was not found,
but is incorrect in identifying the class in which it was not found.
A similar message arises for methods not defined in either class.

Some behaviour in this area previously convinced me that Scalar objects
pass unknown methods through to the value they contain.  In the light of
what I see here, I think I was probably mistaken about that.  Sorry for
confusion caused by referencing that behaviour in other tickets.

-zefram

Reply via email to