File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -76,9 +76,17 @@ function isanonymous_typedef(stmt)
76
76
if isa (stmt, CodeInfo)
77
77
src = stmt # just for naming consistency
78
78
length (src. code) >= 4 || return false
79
- stmt = src. code[end - 1 ]
80
- (isexpr (stmt, :call ) && is_global_ref (stmt. args[1 ], Core, :_typebody! )) || return false
81
- name = (stmt:: Expr ). args[2 ]:: Symbol
79
+ @static if VERSION ≥ v " 1.9.0-DEV.391"
80
+ stmt = src. code[end - 2 ]
81
+ isexpr (stmt, :(= )) || return false
82
+ name = stmt. args[1 ]
83
+ isa (name, Symbol) || return false
84
+ else
85
+ stmt = src. code[end - 1 ]
86
+ isexpr (stmt, :call ) || return false
87
+ is_global_ref (stmt. args[1 ], Core, :_typebody! ) || return false
88
+ name = stmt. args[2 ]:: Symbol
89
+ end
82
90
return startswith (String (name), " #" )
83
91
end
84
92
return false
You can’t perform that action at this time.
0 commit comments