Ticket #745 (closed bug: wontfix)
Make `newclass <STR>` and `newclass <PMC>` consistent
|Reported by:||Austin_Hastings||Owned by:|
(I have marked this "bug" because a reading of the code suggests the behaviors are already in agreement. But see the attached file to show otherwise.)
Creating a class via newclass <STR>
$P0 = newclass 'Dog'
does not add methods from the namespace. While creating the same class via newclass <PMC>
.local pmc class_info class_info = new 'Hash' class_info['name'] = 'Dog' $P0 = newclass class_info
will cause the namespace to be scanned for methods (if the PMC passes a series of validations).
In fact, the documentation for newclass states that it accepts an optional PMC with init info: newclass <STR>, <PMC>, but this is unsupported in the ops. I believe the current behavior is acceptable, but the <STR> and <PMC> versions should behave the same w.r.t. harvesting methods from the namespace. (Alternatively, if there is to be a variant that does not scan for methods, it should be the <PMC> version under the control of a configuration setting in the PMC.)