# HG changeset patch # User Rik # Date 1659565527 25200 # Node ID fb1c7c8a030b85c2655f7d5ac588dc601a3c50c5 # Parent e8a46f8018251be6c307b43dd618ec6555dcecbc Fix duplicate names displayed with mixed @class/classdef classes (Bug #62802) * ov-classdef.cc (F__methods__): If class is a classdef one then use get_method_map() to find methods. Otherwise, class is a legacy @class one and use load_path.methods() to get methods. diff -r e8a46f801825 -r fb1c7c8a030b libinterp/octave-value/ov-classdef.cc --- a/libinterp/octave-value/ov-classdef.cc Wed Aug 03 19:00:08 2022 +0200 +++ b/libinterp/octave-value/ov-classdef.cc Wed Aug 03 15:25:27 2022 -0700 @@ -747,6 +747,7 @@ if (cls.ok ()) { + // Find methods for classdef objects. std::map method_map = cls.get_method_map (false, true); @@ -761,12 +762,13 @@ sv = string_vector (method_names); } - - // The following will also find methods for legacy @CLASS objects. + else + { + // Find methods for legacy @CLASS objects. + load_path& lp = interp.get_load_path (); - load_path& lp = interp.get_load_path (); - - sv.append (lp.methods (class_name)); + sv = string_vector (lp.methods (class_name)); + } return ovl (Cell (sv)); }