Ticket #389: no_methods_in_namespace.2.patch
File no_methods_in_namespace.2.patch, 2.3 KB (added by allison, 12 years ago) |
---|
-
src/pmc/namespace.pmc
128 128 PMC * const classobj = VTABLE_get_class(interp, self); 129 129 STRING * vtable_key = STRINGNULL; 130 130 Parrot_Sub_attributes *sub; 131 INTVAL stored = 0; 131 132 132 133 PMC_get_sub(interp, value, sub); 133 134 … … 152 153 /* Insert it. */ 153 154 VTABLE_set_pmc_keyed_int(interp, vtable, sub->vtable_index, value); 154 155 } 156 if (!(sub->comp_flags & SUB_COMP_FLAG_NSENTRY)) 157 stored = 1; 155 158 } 156 159 157 160 if (sub->comp_flags & SUB_COMP_FLAG_METHOD) { … … 166 169 method_name = sub->method_name; 167 170 } 168 171 add_to_class(interp, nsinfo, classobj, method_name, value); 172 173 if (!(sub->comp_flags & SUB_COMP_FLAG_NSENTRY)) 174 stored = 1; 169 175 } 170 176 171 return 0;177 return stored; 172 178 } 173 179 174 180 PARROT_WARN_UNUSED_RESULT -
ext/nqp-rx/src/stage0/HLL-s0.pir
468 468 .end 469 469 470 470 471 .sub 'quotemod_check' :method 471 .sub 'quotemod_check' :method :nsentry 472 472 .param string mod 473 473 474 474 $P0 = find_dynamic_lex '%*QUOTEMOD' -
t/pmc/namespace-subs.t
73 73 is($I1, 75, "Invoked stored method") 74 74 75 75 $P2 = get_hll_global ['MethodTest'], 'methodtest' 76 todo(0, "Method not stored in namespace", "see TT #389") 77 # is_null($P2, "Method not stored in namespace") 76 is_null($P2, "Method not stored in namespace") 78 77 .end 79 78 80 79 .sub 'store_nsentry' -
t/compilers/imcc/syn/subflags.t
69 69 isa_ok($P30, 'Sub', ":method sub found w/.const") 70 70 $P0 = get_global 'method1' 71 71 $I0 = isnull $P0 72 todo($I0, ":method sub not found in namespace")72 ok($I0, ":method sub not found in namespace") 73 73 74 74 ## :subid subs 75 75 .const 'Sub' $P40 = 'subid1'