|
From: | Richard |
Subject: | [Octave-bug-tracker] [bug #61524] Class methods cannot have a variable named 'methods' (ok in Matlab) |
Date: | Mon, 22 Nov 2021 07:43:09 -0500 (EST) |
User-agent: | Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:94.0) Gecko/20100101 Firefox/94.0 |
URL: <https://savannah.gnu.org/bugs/?61524> Summary: Class methods cannot have a variable named 'methods' (ok in Matlab) Project: GNU Octave Submitted by: crobar Submitted on: Mon 22 Nov 2021 12:43:07 PM UTC Category: Interpreter Severity: 3 - Normal Priority: 5 - Normal Item Group: Unexpected Error or Warning Status: None Assigned to: None Originator Name: RIchard Crozier Originator Email: Open/Closed: Open Release: dev Discussion Lock: Any Operating System: Any _______________________________________________________ Details: If you create a class method which contains a variable name 'methods' it results in a parse error. I believe this is an error, but is certainly also incompatible with Matlab. Example: define testMethodVarNameInMethod.m classdef testMethodVarNameInMethod methods function suite = test_methods_variable() methods = []; end end end The result: octave:3> x = testMethodVarNameInMethod error: parse error near line 6 of file /home/rcrozier/src/mfiles/mcode-hg/octave_test/testMethodVarNameInMethod.m syntax error >>> methods = []; I'm running off the stable branch $ hg id 869dea2b5c91 (stable) _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?61524> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/
[Prev in Thread] | Current Thread | [Next in Thread] |