Skip to content

Docstrings on function call are strange #335

@LilithHafner

Description

@LilithHafner

Somehow "docstring" identifier() adds the docstring to the identifier and discards the trailing parentheses. This should probably error.

julia> "abc" g()
g

julia> :("abc" g())
ERROR: ParseError:
# Error @ REPL[2]:1:9
:("abc" g())
#       └┘ ── Expected `)`
# Error @ REPL[2]:1:12
:("abc" g())
#          ╙ ── extra tokens after end of expression
Stacktrace:
 [1] top-level scope
   @ none:1

julia> g
ERROR: UndefVarError: `g` not defined

julia> @doc g
  abc

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions