bugGNU Octave - Bugs: bug #61362, error: class not found

 
 

bug #61362: error: class not found

Submitter:  Guillaume <gyom>
Submitted:  Thu 21 Oct 2021 11:08:47 AM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Unexpected Error or Warning
Status:  Duplicate Assigned to:  None
Originator Name:  Guillaume Open/Closed:  * Closed
Release:  * dev Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 24 Oct 2021 12:15:39 PM UTC, comment #2: 

Thanks for the feedback 🙂

Kai Torben Ohlhus <siko1056>
Group Member
Thu 21 Oct 2021 03:50:27 PM UTC, comment #1: 

This can be closed as duplicate of #48682

Guillaume <gyom>
Thu 21 Oct 2021 11:08:47 AM UTC, original submission:  

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



Guillaume <gyom>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Digest:
   bug dependencies.

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by siko1056 (Posted a comment)
  • -email is unavailable- added by gyom (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-10-24 siko1056 Dependencies- Depends on bugs #48682
    2021-10-24 siko1056 StatusNone Duplicate
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code