bugGNU Octave - Bugs: bug #38128, Overloaded vercat() not called in...


bug #38128: Overloaded vercat() not called in some cases

Submitted by:  None
Submitted on:  Sun Jan 20 21:35:29 2013  
Category: InterpreterSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: None
Originator Name: Julien BectOriginator Email: -unavailable-
Open/Closed: ClosedRelease: dev
Operating System: GNU/Linux

Add a New Comment (Rich MarkupRich Markup):

You are not logged in

Please log in, so followups can be emailed to you.


(Jump to the original submission Jump to the original submission)

Thu Feb 28 16:42:36 2013, comment #10:

Thanks, I merged your addendum:


Jordi GutiƩrrez Hermoso <jordigh>
Project Administrator
Thu Feb 28 08:03:10 2013, comment #9:

Oops, sorry... here is the patch

(file #27541)

Julien Bect <jbect>
Thu Feb 28 08:02:42 2013, comment #8:

Here is a patch for the bug number in classes.tst.

Julien Bect <jbect>
Wed Feb 27 20:20:51 2013, comment #7:

I have pushed and merged your change:


I noticed your commit message doesn't mention the bug number. I had to hunt around to find it. :-/

The bug number you refer to in classes.tst (38170) also seems to be wrong and is pointing at an unrelated problem.

Can you please fix that?

Jordi GutiƩrrez Hermoso <jordigh>
Project Administrator
Tue Feb 26 13:45:03 2013, comment #6:

Here is a minor update of my patch (rebased and tested).

(file #27533)

Julien Bect <jbect>
Thu Feb 21 15:56:07 2013, comment #5:

I just found out that the same problem was already exhibited (although not advertised in the comments) by the example file #24630 attached to bug #35118.

Julien Bect <jbect>
Mon Feb 11 19:57:06 2013, comment #4:

Here is the same patch with test_classes.m renamed to classes.tst.

(file #27444)

Julien Bect <jbect>
Fri Feb 8 07:57:27 2013, comment #3:

A few tests concerning classes and concatenation are located test/class-concat (added by JWE in Nov 2011).

In the patch that I just posted, I have added my own tests in test/classes/test_classes.m.

Should I move my concatenation tests into test/class-concat, or rather merge the old tests from test/class-concat into test/classes/test_classes.m ?

[Note: this was originally discussed on the maintainer mailing-list, http://octave.1599824.n4.nabble.com/Tracking-bug-38128-Overloaded-vertcat-not-called-in-some-cases-td4649193.html]

Julien Bect <jbect>
Fri Feb 8 07:51:49 2013, comment #2:

The attached patch seems to fix the problem.

I have added a few tests in test/classes/test_classes.m, to check that vertical and horizontal concatenation still work in the case where nothing is overloaded.

[Note: this was initially posted on the patch tracker, see patch #7935. Mea culpa.]

(file #27422)

Julien Bect <jbect>
Sat Jan 26 13:14:17 2013, comment #1:

horzcat() is affected by the exact same problem

Julien Bect <jbect>
Sun Jan 20 21:35:29 2013, original submission:

Let us consider a class @A, with the following constructor:

and the following overload vertcat function:

The following script illustrates the problem:

It seems that the overloaded vertcat function is only called when both arguments are class A objects.

I would expect it to be called as soon as one of the two arguments is of class A (this is what happens, for instance, with an overloaded plus() function).

The problem has been observed in Octave 3.6.2 (Ubuntu 12.10 install) and 3.6.4-rc1 (built from branch stable, revision 7ad3eea8a3af).

Attachment: test script + @A class directory.



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

Attach File(s):

Attached Files
file #27305:  octaveVertcatIssue.zip added by None (2kB - application/zip)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by jordigh (Updated the item)
  • -unavailable- added by jbect (Posted a comment)
  • -unavailable- added by None (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 8 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu Feb 28 08:03:10 2013jbectAttached File-=>Added jbFixObjConcatProblem3Addendum.patch, #27541
    Wed Feb 27 20:20:51 2013jordighStatusPatch Submitted=>Fixed
    Tue Feb 26 13:45:03 2013jbectAttached File-=>Added jbFixObjConcatProblem3.patch, #27533
    Mon Feb 11 19:57:06 2013jbectAttached File-=>Added jbFixObjConcatProblem2.patch, #27444
    Fri Feb 8 14:09:32 2013jordighStatusNone=>Patch Submitted
    Fri Feb 8 07:51:49 2013jbectAttached File-=>Added jbFixObjConcatProblem.patch, #27422
    Sun Jan 20 21:35:29 2013NoneAttached File-=>Added octaveVertcatIssue.zip, #27305

    Back to the top

    Powered by Savane 3.1-cleanup1