File tree Expand file tree Collapse file tree 2 files changed +15
-4
lines changed
Expand file tree Collapse file tree 2 files changed +15
-4
lines changed Original file line number Diff line number Diff line change 11name = " ObjectiveC"
22uuid = " e86c9b32-1129-44ac-8ea0-90d5bb39ded9"
3- version = " 2.1.0 "
3+ version = " 2.1.1 "
44
55[deps ]
66CEnum = " fa961155-64e5-5f13-b03f-caf6b980ea82"
Original file line number Diff line number Diff line change @@ -513,10 +513,21 @@ macro autoreleasepool(ex...)
513513 end
514514 f = unsafe ? NSUnsafeAutoreleasePool : NSAutoreleasePool
515515
516- if Meta. isexpr (code, :function )
517- # function definition
516+ if Meta. isexpr (code, :(= )) &&
517+ (Meta. isexpr (code. args[1 ], :call ) || Meta. isexpr (code. args[1 ], :where ))
518+ # function definition, short form
519+ sig, body = code. args
520+ @assert Meta. isexpr (body, :block )
521+ managed_body = quote
522+ $ f () do
523+ $ body
524+ end
525+ end
526+ esc (Expr (:(= ), sig, managed_body))
527+ elseif Meta. isexpr (code, :function )
528+ # function definition, long form
518529 sig = code. args[1 ]
519- @assert Meta. isexpr (sig, :call )
530+ @assert Meta. isexpr (sig, :call ) || Meta . isexpr (sig, :where )
520531 body = code. args[2 ]
521532 @assert Meta. isexpr (body, :block )
522533 managed_body = quote
You can’t perform that action at this time.
0 commit comments