Skip to content

Commit 2bb2d3d

Browse files
authored
fix: ambiguous call to String (#7)
1 parent 8ac7cfc commit 2bb2d3d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/coord.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module CoordinateSystem
22
using StaticArraysCore
3-
import Base: size, getindex, cconvert, unsafe_convert
3+
import Base: size, getindex, cconvert, unsafe_convert, String
44

55
export AbstractCoordinateSystem, CoordinateVector, coord
66

@@ -24,8 +24,8 @@ end
2424
""" GSM
2525

2626
coord(v::CoordinateVector) = v.sym
27-
(::Type{T})(::Type{S}) where {T<:AbstractString,S<:AbstractCoordinateSystem} = T(String(nameof(S)))
28-
(::Type{T})(::S) where {T<:AbstractString,S<:AbstractCoordinateSystem} = T(S)
27+
Base.String(::Type{S}) where {S<:AbstractCoordinateSystem} = String(nameof(S))
28+
Base.String(::S) where {S<:AbstractCoordinateSystem} = T(S)
2929

3030
# https://github.com/JuliaArrays/StaticArrays.jl/blob/master/src/FieldArray.jl
3131
Base.size(::CoordinateVector) = (3,)

0 commit comments

Comments
 (0)