Chaining struct method invocations
Bahman Movaqar via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Mon Sep 7 07:12:23 PDT 2015
I need some help understand the behaviour of my code[1].
Specifically I have trouble with `add` method on line 79.
My impression is that since it returns `this`, multiple
invocations can be chained like `obj.add(X).add(Y).add(Z)`.
However the test on line 92 fails and if I do a `writeln`, only
"p1" and "p2" records show up.
What am I missing here? Thanks in advance.
[1]
https://github.com/bahmanm/d-etudes/blob/master/source/e002/models.d
More information about the Digitalmars-d-learn
mailing list