octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #61362] error: class not found


From: Guillaume
Subject: [Octave-bug-tracker] [bug #61362] error: class not found
Date: Thu, 21 Oct 2021 07:08:49 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0

URL:
  <https://savannah.gnu.org/bugs/?61362>

                 Summary: error: class not found
                 Project: GNU Octave
            Submitted by: gyom
            Submitted on: Thu 21 Oct 2021 11:08:47 AM UTC
                Category: Interpreter
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Unexpected Error or Warning
                  Status: None
             Assigned to: None
         Originator Name: Guillaume
        Originator Email: 
             Open/Closed: Open
                 Release: dev
         Discussion Lock: Any
        Operating System: GNU/Linux

    _______________________________________________________

Details:

With the following 'myclass' class:


classdef myclass
  properties
    id;
  endproperties
  methods
    function this = myclass (id)
      if (! nargin)
        print_usage ();
      endif
      this.id = id;
    endfunction
  endmethods
endclassdef

%!test myclass ("");
%!error myclass ();


the tests fail from the second time they are run:


>> test myclass
PASSES 2 out of 2 tests
>> test myclass
***** test myclass ("");
!!!!! test failed
class not found: myclass


and by calling the tests directly, it seems the issue is due to the fact that
print_usage () errors (as there is no help text) and from there on, the class
is not found any more.


>> clear all
>> myclass ("");
>> myclass ();
error: print_usage: 'myclass' not found
>> myclass ("");
error: class not found: myclass
error: called from
    myclass at line 14 column 15







    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?61362>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]