[Top][All Lists]

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

[Octave-bug-tracker] [bug #51377] Parse error for abstract methods

From: Martynas
Subject: [Octave-bug-tracker] [bug #51377] Parse error for abstract methods
Date: Mon, 3 Jul 2017 19:27:34 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:54.0) Gecko/20100101 Firefox/54.0


                 Summary: Parse error for abstract methods
                 Project: GNU Octave
            Submitted by: mpata
            Submitted on: Tue 04 Jul 2017 02:27:33 AM EEST
                Category: Interpreter
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Matlab Compatibility
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 4.2.1
        Operating System: Any



GNU Octave shows parse error for abstract methods in abstract classes defined
with "classdef".

For example, we have an abstract class:

classdef (Abstract) AbstractIncrementClass
  methods (Static, Abstract)
    [Y] = Increment(X)

And a concrete class:

classdef ConcreteIncrementClass < AbstractIncrementClass
  methods (Static)
    function [Y] = Increment(X)
      Y = X + 1;

Running command "ConcreteIncrementClass.Increment(1)" results in error message
(path removed):

parse error near line 3 of file ...\AbstractIncrementClass.m

  external methods are only allowed in @-folders

>>>     [Y] = Increment(X)

In Matlab it gives the answer (2).

Without "Static" keyword the same error message is shown while running the
constructor of concrete class (Matlab shows no error here as well).


Reply to this item at:


  Message sent via/by Savannah

reply via email to

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