Skip to content

Conversation

@raman-maker
Copy link
Contributor

julia> struct HasPlain
n::Int
HasPlain() = new()
end

julia> HasPlain()
HasPlain(0)

julia> HasPlain()
HasPlain(0)

julia> struct HasPlain
                 n::Int
                 HasPlain() = new()
             end

julia> HasPlain()
HasPlain(0)

julia> HasPlain()
HasPlain(0)
@adienes
Copy link
Member

adienes commented Oct 18, 2025

as the docstring says, these contents are undefined so the value is not guaranteed to be anything, neither 0 nor what you have put instead.

@adienes adienes closed this Oct 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants