Skip to content

Commit 3125ae4

Browse files
committed
Fix incorrect variable in repeat
1 parent 618df72 commit 3125ae4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/InlineStrings.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,7 @@ summed_type(a::Type{<:SmallInlineStrings}, b::Type{<:SmallInlineStrings}) = summ
616616
function Base.repeat(x::T, r::Integer) where {T <: InlineString}
617617
r < 0 && throw(ArgumentError("can't repeat a string $r times"))
618618
r == 0 && return ""
619-
r == 1 && return s
619+
r == 1 && return x
620620
n = sizeof(x)
621621
out = Base._string_n(n * r)
622622
if n == 1 # common case: repeating a single-byte string

0 commit comments

Comments
 (0)