On 13 January 2015 at 16:39, Ivar Nesje <[email protected]> wrote:

> I can see two solutions. Either you define an outer constructor for
> MyOtherType,
>
> MyOtherType(i::Int) = MyOtherType(MyType(i))
>
>
Ah, I see. I was trying to do the equivalent of

MyOtherType(i::Int) = MyOtherType(i)

expecting the constructor to be called automatically - I just didn't think
of calling it explicitly. Many thanks, and apologies for the relatively
trivial question.

Nathaniel

-- 
Nathaniel Virgo
http://nathanielvirgo.com

Reply via email to