Skip to content

Regression in error message for function @main() ... #58840

@KristofferC

Description

@KristofferC

File:

function @main()
    print("hello")
end

1.11:

❯ julia +1.11 bug.jl 
ERROR: LoadError: ParseError:
# Error @ /Users/kc/JuliaPkgs/Backporter/bug.jl:2:10

function @main()
#        └─────┘ ── Invalid signature in function definition

1.12:

❯ julia +1.12-nightly --project bug.jl
ERROR: LoadError: syntax: invalid syntax function (thismodule).main
    # /Users/kc/JuliaPkgs/Backporter/bug.jl, line 2
    # /Users/kc/JuliaPkgs/Backporter/bug.jl, line 3
    (thismodule).print("hello")
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    compiler:loweringSyntax lowering (compiler front end, 2nd stage)macros@macros

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions