Skip to content

Cannot quote public statements #51450

Open
Open
@mbauman

Description

@mbauman

It'd be great if this could work:

julia> :(public foo)
ERROR: ParseError:
# Error @ REPL[13]:1:10
:(public foo)
#        └─┘ ── Expected `)`
Stacktrace:
 [1] top-level scope
   @ none:1

Found because I was exploring public behaviors interactively and was trying to do something like the below — the equivalent using export works:

julia> @eval Base begin
       foo = 1
       public foo
ERROR: ParseError:
# Error @ REPL[16]:3:8
foo = 1
public foo
#      └─┘ ── Expected `end`
Stacktrace:
 [1] top-level scope
   @ none:1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIndicates an unexpected problem or unintended behaviorparserLanguage parsing and surface syntax

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions