Skip to content

Commit f3941e1

Browse files
committed
Fix ambiguity caused by changes to Base
1 parent 0a436e9 commit f3941e1

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

Project.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ keywords = ["Characters"]
44
license = "MIT"
55
desc = "Basic functionality for Chr type"
66
authors = ["ScottPJones <[email protected]>"]
7-
version = "1.0.2"
7+
version = "1.0.3"
88

99
[deps]
1010
Unicode = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5"

src/core.jl

+4-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,10 @@ rem(x::Chr, ::Type{T}) where {T<:Chr} = (x.v)%T
7979
rem(x::Chr, ::Type{T}) where {T<:Char} = (x.v)%T
8080
rem(x::Chr, ::Type{T}) where {T<:Number} = (x.v)%T
8181

82-
(::Type{S})(v::T) where {S<:Union{UInt32, Int, UInt}, T<:Chr} = codepoint(v)%S
82+
(::Type{UInt32})(v::Chr) = codepoint(v)%UInt32
83+
(::Type{UInt64})(v::Chr) = codepoint(v)%UInt64
84+
(::Type{Int32})(v::Chr) = codepoint(v)%Int32
85+
(::Type{Int64})(v::Chr) = codepoint(v)%Int64
8386
(::Type{Char})(v::Chr) = Char(codepoint(v))
8487
(::Type{T})(v::Char) where {T<:Chr} = T(codepoint(v))
8588

0 commit comments

Comments
 (0)