From 67d9c36c7190008056f1dd0fefd31eb33c444d3e Mon Sep 17 00:00:00 2001 From: Jishnu Bhattacharya Date: Tue, 31 Oct 2023 19:25:06 +0530 Subject: [PATCH] nospecialize in displaying SOneTo (#1198) --- src/SOneTo.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/SOneTo.jl b/src/SOneTo.jl index bdeb4316..95b12131 100644 --- a/src/SOneTo.jl +++ b/src/SOneTo.jl @@ -64,8 +64,8 @@ function Base.getproperty(::SOneTo{n}, s::Symbol) where {n} end end -function Base.show(io::IO, ::SOneTo{n}) where {n} - print(io, "SOneTo(", n::Int, ")") +function Base.show(io::IO, @nospecialize(x::SOneTo)) + print(io, "SOneTo(", length(x)::Int, ")") end Base.@pure function Base.checkindex(::Type{Bool}, ::SOneTo{n1}, ::SOneTo{n2}) where {n1, n2}