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

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

[Octave-bug-tracker] [bug #58041] 'clear all' produces error in handle c


From: anonymous
Subject: [Octave-bug-tracker] [bug #58041] 'clear all' produces error in handle class delete method accessing private property
Date: Tue, 24 Mar 2020 16:25:44 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:74.0) Gecko/20100101 Firefox/74.0

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

                 Summary: 'clear all' produces error in handle class delete
method accessing private property
                 Project: GNU Octave
            Submitted by: None
            Submitted on: Tue 24 Mar 2020 08:25:42 PM UTC
                Category: Interpreter
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Unexpected Error
                  Status: None
             Assigned to: None
         Originator Name: Torsten Schorr
        Originator Email: 
             Open/Closed: Open
                 Release: 5.2.0
         Discussion Lock: Any
        Operating System: GNU/Linux

    _______________________________________________________

Details:

The class definition

classdef myclass < handle
  properties (Access = private)
    iID
  end
  methods
    function self = myclass
      self.iID = 0;
    end
    function delete(obj)
      disp(obj.iID)
    end
  end
end

produces error on 'clear all':
>> 
x = myclass
x =

<object myclass>

>> clear all
>> warning: error caught while executing handle class delete method:
subsref: property `iID' has private access and cannot be obtained in this
context

'clear x' works as expected.




    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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