Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Symbol redefinition warnings #16173

Merged
merged 4 commits into from
May 4, 2016
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Revert the 2:end change from a9df7e9
there are dot operators that are more than 2 characters long that these
loops may want to extend to in the future, leaving the 2:end the way it
was will be less error prone
  • Loading branch information
tkelman committed May 3, 2016
commit cdbf48b273e98d6bd73e31967c18a0f75b8bbb0a
2 changes: 1 addition & 1 deletion base/dates/arithmetic.jl
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ end
(-)(y::Period,x::TimeType) = x - y

for op in (:.+, :.-)
op_ = Symbol(string(op)[2])
op_ = Symbol(string(op)[2:end])
@eval begin
# GeneralPeriod, AbstractArray{TimeType}
($op){T<:TimeType}(x::AbstractArray{T}, y::GeneralPeriod) =
Expand Down
4 changes: 2 additions & 2 deletions base/dates/periods.jl
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ for (op,Ty,Tz) in ((:.*,Real,:P),
(:.%,:P,:P),
(:mod,:P,:P))
sop = string(op)
op_ = sop[1] == '.' ? Symbol(sop[2]) : op
op_ = sop[1] == '.' ? Symbol(sop[2:end]) : op
@eval begin
function ($op){P<:Period}(X::StridedArray{P},y::$Ty)
Z = similar(X, $Tz)
Expand Down Expand Up @@ -234,7 +234,7 @@ GeneralPeriod = Union{Period,CompoundPeriod}
(+){P<:GeneralPeriod}(x::StridedArray{P}) = x

for op in (:.+, :.-)
op_ = Symbol(string(op)[2])
op_ = Symbol(string(op)[2:end])
@eval begin
function ($op){P<:GeneralPeriod}(X::StridedArray{P},y::GeneralPeriod)
Z = similar(X, CompoundPeriod)
Expand Down