# HG changeset patch # User John W. Eaton # Date 1548103399 18000 # Mon Jan 21 15:43:19 2019 -0500 # Branch stable # Node ID cdf382ff1ce17679208f9b74fba2365a0af39381 # Parent ada14ef3067feca546cf8dc2543e924b58ae6165 use @CLASS name when searching for @CLASS/METHOD (bug #55501) * help.cc (help_system::which): Decode @class/method to search for class methods. diff --git a/libinterp/corefcn/help.cc b/libinterp/corefcn/help.cc --- a/libinterp/corefcn/help.cc +++ b/libinterp/corefcn/help.cc @@ -237,14 +237,32 @@ namespace octave { std::string file; - type = ""; + if (name.empty ()) + return file; - symbol_table& symtab = m_interpreter.get_symbol_table (); - - octave_value val = symtab.find_function (name); + type = ""; if (name.find_first_of ('.') == std::string::npos) { + symbol_table& symtab = m_interpreter.get_symbol_table (); + + octave_value val; + + if (name[0] == '@') + { + size_t pos = name.find_first_of ('/'); + + if (pos == std::string::npos) + return file; + + std::string method = name.substr (pos); + std::string dispatch_type = name.substr (1, pos); + + val = symtab.find_method (method, dispatch_type); + } + else + val = symtab.find_function (name); + if (val.is_defined ()) { octave_function *fcn = val.function_value ();