Skip to content

Commit 44764fa

Browse files
committed
Add type signature
1 parent 5149835 commit 44764fa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/parsing.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ end
232232
"""
233233
Same as `parse(T, s, rounding_mode)`, but also accept string representing rational numbers.
234234
"""
235-
function parse_num(T, s, rounding_mode)
235+
function parse_num(::Type{T}, s::AbstractString, rounding_mode::RoundingMode) where {T<:AbstractFloat}
236236
if '/' in s
237237
num, denum = parse.(BigInt, split(s, '/'; keepempty = false))
238238
return T(num//denum, rounding_mode)

0 commit comments

Comments
 (0)