Skip to content

Commit 91e63fb

Browse files
committed
Remove * and join from backports
They're just too invalidating
1 parent bb85b9d commit 91e63fb

File tree

3 files changed

+29
-35
lines changed

3 files changed

+29
-35
lines changed

src/strings/basic.jl

Lines changed: 26 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,29 @@ _isannotated(s) = _isannotated(typeof(s))
66
# actually from substring.jl
77
_isannotated(::SubString{T}) where {T} = _isannotated(T)
88

9-
function (*)(s1::Union{AnnotatedChar, AnnotatedString}, s2::Union{AbstractChar, AbstractString})
10-
annotatedstring(s1, s2)
11-
end
12-
13-
function (*)(s1::Union{AbstractChar, AbstractString}, s2::Union{AnnotatedChar, AnnotatedString})
14-
annotatedstring(s1, s2)
15-
end
16-
17-
function (*)(s1::Union{AnnotatedChar, AnnotatedString}, s2::Union{AnnotatedChar, AnnotatedString})
18-
annotatedstring(s1, s2)
19-
end
20-
21-
function (*)(s1::Union{AbstractChar, AbstractString}, s2::Union{AbstractChar, AbstractString}, ss::Union{AbstractChar, AbstractString}...)
22-
if _isannotated(s1) || _isannotated(s2) || any(_isannotated, ss)
23-
annotatedstring(s1, s2, ss...)
24-
else
25-
string(s1, s2, ss...)
26-
end
27-
end
9+
# NOTE Too invalidating:
10+
11+
# function (*)(s1::Union{AnnotatedChar, AnnotatedString}, s2::Union{AbstractChar, AbstractString})
12+
# annotatedstring(s1, s2)
13+
# end
14+
15+
# function (*)(s1::Union{AbstractChar, AbstractString}, s2::Union{AnnotatedChar, AnnotatedString})
16+
# annotatedstring(s1, s2)
17+
# end
18+
19+
# function (*)(s1::Union{AnnotatedChar, AnnotatedString}, s2::Union{AnnotatedChar, AnnotatedString})
20+
# annotatedstring(s1, s2)
21+
# end
22+
23+
# function (*)(s1::Union{AbstractChar, AbstractString}, s2::Union{AbstractChar, AbstractString}, ss::Union{AbstractChar, AbstractString}...)
24+
# if _isannotated(s1) || _isannotated(s2) || any(_isannotated, ss)
25+
# annotatedstring(s1, s2, ss...)
26+
# else
27+
# string(s1, s2, ss...)
28+
# end
29+
# end
30+
31+
# # From io.jl
32+
# join(iterator) = _join_preserve_annotations(iterator)
33+
# join(iterator, delim) = _join_preserve_annotations(iterator, delim)
34+
# join(iterator, delim, last) = _join_preserve_annotations(iterator, delim, last)

src/strings/overrides.jl

Lines changed: 0 additions & 6 deletions
This file was deleted.

src/strings/strings.jl

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,9 @@ module AnnotatedStrings
55
import Base: @propagate_inbounds, AbstractPipe, IteratorSize, TTY, String, cmp,
66
codepoint, codeunit, codeunits, compile, convert, copy, eachmatch, eltype,
77
empty, firstindex, get, getindex, haskey, in, isvalid, invoke, iterate,
8-
join, keys, keys, lastindex, length, ncodeunits, match, merge, parse,
9-
pipe_reader, pipe_writer, position, print, promote_rule, read, repeat,
10-
reverse, seek, seekend, setindex, show, skip, truncate, tryparse, write,
11-
*, ==
8+
keys, keys, lastindex, length, ncodeunits, match, merge, parse, pipe_reader,
9+
pipe_writer, position, print, promote_rule, read, repeat, reverse, seek,
10+
seekend, setindex, show, skip, truncate, tryparse, write, ==
1211

1312
using ..Compat
1413

@@ -26,10 +25,4 @@ include("basic.jl")
2625
include("io.jl")
2726
include("regex.jl")
2827

29-
function __init__()
30-
# Method overwriting
31-
ccall(:jl_generating_output, Cint, ()) == 0 &&
32-
eval(:(include(joinpath($@__DIR__, "overrides.jl"))))
33-
end
34-
3528
end

0 commit comments

Comments
 (0)