# New Ticket Created by "Alek Storm" # Please include the string: [perl #42430] # in the subject line of all future correspondence about this issue. # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=42430 >
This patch makes the :vtable sub pragma imply the :method pragma, which seems like common sense to me, since using :vtable without :method doesn't make much sense, and vtable overrides are called as methods from C anyway. Using :vtable and :method explicitly still works, so no existing code is broken. It obviously affects design far more than code - the patch is only two lines :). -- Alek Storm
Index: compilers/imcc/imcc.y =================================================================== --- compilers/imcc/imcc.y (revision 18129) +++ compilers/imcc/imcc.y (working copy) @@ -709,11 +709,11 @@ ; vtable: VTABLE_METHOD - { $$ = 0; + { $$ = P_METHOD; IMCC_INFO(interp)->cur_unit->vtable_name = NULL; IMCC_INFO(interp)->cur_unit->is_vtable_method = 1; } | VTABLE_METHOD '(' STRINGC ')' - { $$ = 0; + { $$ = P_METHOD; IMCC_INFO(interp)->cur_unit->vtable_name = strdup($3); IMCC_INFO(interp)->cur_unit->is_vtable_method = 1; } ;