
16 Jan
2014
16 Jan
'14
2:55 p.m.
To me this reads that repr should be both a CirclePen and a RectPen in order to satisfy the type constraint in the case of Line, but it seems that it is accepting a CirclePen or a RectPen (which is the desired behaviour, so I'm not complaining).
Having thought about it, it _IS_ saying that repr is an instance of both CirclePen and RectPen, which is why I can call either circle or rectangle in that context. The called function then decides the type, rather than the calling function. PS: I got out of bed with this epiphany, so I may be incoherent and tired and not making any sense at all...