Skip to content

Type declaration on anonymous function arguments in macro not working on 1.5 #37134

@raminammour

Description

@raminammour

Hello,

Originally broke DistributedArrays, filed here. It turns out it is about type declaration of an anonymous function argument inside a macro (that was a mouthful :P).

julia> macro bla()
       :(x :: Int -> 62)
       end
@bla (macro with 1 method)

julia> @bla
ERROR: syntax: malformed expression
Stacktrace:
 [1] top-level scope at REPL[2]:1

This stopped working on version 1.5, was working as of 1.4 (works without the type declaration ::Int). Curiously, eval(:(x::Int -> 62)) works too.

Cheers!

Metadata

Metadata

Assignees

Labels

macros@macrosregressionRegression in behavior compared to a previous version

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions