Skip Menu |
Report information
Id: 131262
Status: new
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: trey [at]

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

Date: Sat, 06 May 2017 17:54:47 +0000
From: Trey Ethan Harris <trey [...]>
To: "rakudobug [...]" <rakudobug [...]>
Subject: [BUG] LTA error message for .^add_method redefinition
Download (untitled) / with headers
text/plain 893b

Given RedefErr.pm6:

use v6.c;
unit class RedefErr;

method foo() { -4; }

method four() {, "four"); }

BEGIN { ::?CLASS.^add_method('foo', ::?CLASS.^method_table<four>) };

attempting to use the package gives the following compile-time error:

$ perl --version
This is Rakudo version 2017.03-123-gcb27bce built on MoarVM version 2017.03-87-g5d73bf4
implementing Perl 6.c.
$ perl6 -MRedefErr
===SORRY!=== Error while compiling /home/trey/src/HandlesBug/lib/RedefErr.pm6 (RedefErr)
An exception occurred while evaluating a BEGIN
at /home/trey/src/HandlesBug/lib/RedefErr.pm6 (RedefErr):8
Exception details:
  ===SORRY!=== Error while compiling
  Package 'RedefErr' already has a method 'foo' (did you mean to declare a multi-method?)
  at :


Note the message completes with at :.

It should give a more useful error message about where the redefinition actually occurred.


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

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