Unfortunately, Julia does not actually allow definitions of default values in that way. What you did do was define a local variable b with a value of zero, that I believe could be used in inner constructors of Test.
Cheers, Kevin On Wednesday, February 12, 2014, Fil Mackay <[email protected]> wrote: > I've just noticed that adding a default value to a field removes the > constructor, and any trace of the field from the type: > > julia> type Test > a::Int > b::Int = 0 > end > > julia> Test > Test (constructor with 0 methods) > > julia> Test.names, Test.types > ((:a,),(Int64,)) > > Is this intentional/expected? > >
