Skip to content

Commit 1b13f87

Browse files
committed
Check Enum is defined before using, for Julia 0.3
1 parent 4d4eb7b commit 1b13f87

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/fmtspec.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,10 @@ type _Bin end
167167
_srepr(x) = repr(x)
168168
_srepr(x::AbstractString) = x
169169
_srepr(x::Char) = string(x)
170-
_srepr(x::Enum) = string(x)
170+
171+
if isdefined(:Enum)
172+
_srepr(x::Enum) = string(x)
173+
end
171174

172175
function printfmt(io::IO, fs::FormatSpec, x)
173176
cls = fs.cls

0 commit comments

Comments
 (0)