@@ -253,7 +253,7 @@ function _pack_mutable(binding, fields)
253
253
e
254
254
end
255
255
function _pack_immutable (binding, fields)
256
- error (" Cannot pack an immutable. Consider using `reconstruct` (or file a feature request)." )
256
+ error (" Cannot pack an immutable. Consider using `reconstruct` (or make a pull request)." )
257
257
end
258
258
259
259
const macro_hidden_nargs = length (:(@m ). args) - 1 # ==1 on Julia 0.6, ==2 on Julia 0.7
@@ -556,17 +556,12 @@ function with_kw(typedef, mod::Module, withshow=true)
556
556
esc ($ Parameters.$ (_pack)(ex, $ unpack_vars))
557
557
end
558
558
macro $pack_name_depr (ex)
559
- Base. depwarn (" The macro `@pack_A ` is deprecated, use `@$(string ( $ pack_name )) `" , $ (QuoteNode (pack_name_depr)) )
559
+ Base. depwarn (" The macro `@$( $ (Meta . quot (pack_name))) ` is deprecated, use `@$($ (Meta . quot (pack_name_depr) )) `" , $ (QuoteNode (pack_name_depr)) )
560
560
esc ($ Parameters.$ (_pack)(ex, $ unpack_vars))
561
561
end
562
562
$ tn
563
563
end
564
564
end
565
- @static if isdefined (Base, Symbol (" @__MODULE__" ))
566
- @deprecate with_kw (typedef, withshow= true ) with_kw (typedef, @__MODULE__ , withshow= true )
567
- else
568
- @deprecate with_kw (typedef, withshow= true ) with_kw (typedef, current_module (), withshow= true )
569
- end
570
565
571
566
"""
572
567
Do the with-kw stuff for named tuples.
616
611
For more details see manual.
617
612
"""
618
613
macro with_kw (typedef)
619
- @static if isdefined (Base, Symbol (" @__MODULE__" ))
620
- return esc (with_kw (typedef, __module__, true ))
621
- else
622
- return esc (with_kw (typedef, current_module (), true ))
623
- end
614
+ return esc (with_kw (typedef, __module__, true ))
624
615
end
625
616
626
617
macro with_kw (args... )
644
635
For more details see manual.
645
636
"""
646
637
macro with_kw_noshow (typedef)
647
- @static if isdefined (Base, Symbol (" @__MODULE__" ))
648
- return esc (with_kw (typedef, __module__, false ))
649
- else
650
- return esc (with_kw (typedef, current_module (), false ))
651
- end
638
+ return esc (with_kw (typedef, __module__, false ))
652
639
end
653
640
654
641
0 commit comments