Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error documenting struct with @lazy #31

Open
henry2004y opened this issue Jul 17, 2023 · 0 comments · May be fixed by #36
Open

Error documenting struct with @lazy #31

henry2004y opened this issue Jul 17, 2023 · 0 comments · May be fixed by #36

Comments

@henry2004y
Copy link

Hi,

Thank you for developing this package! I encounter an error when trying to add a docstring to the modified struct.

test.jl:

using LazilyInitializedFields

"doc1"
@lazy struct Foo
   "doc2"
   a::Int
   @lazy b::Int
end
julia> using LazilyInitializedFields

julia> include("test.jl")
ERROR: LoadError: cannot document the following expression:

#= D:\Computer\Vlasiator.jl\test.jl:4 =# @lazy struct Foo
        #= D:\Computer\Vlasiator.jl\test.jl:5 =#
        "doc2"
        #= D:\Computer\Vlasiator.jl\test.jl:6 =#
        a::Int
        #= D:\Computer\Vlasiator.jl\test.jl:7 =#
        #= D:\Computer\Vlasiator.jl\test.jl:7 =# @lazy b::Int
    end

'@lazy' not documentable. See 'Base.@__doc__' docs for details.

Is this intended, or can the docstring be supported in this package?

@Tortar Tortar linked a pull request Jan 7, 2024 that will close this issue
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 a pull request may close this issue.

1 participant