Skip to content

Commit 227357d

Browse files
committed
Set the number of allowable ambiguities to 0 for julia > v1.5.0-rc1
1 parent 63fb815 commit 227357d

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/convert.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
# this covers most conversions and "statically-sized reshapes"
1010
@inline convert(::Type{SA}, sa::StaticArray) where {SA<:StaticArray} = SA(Tuple(sa))
11-
@inline convert(::Type{SA}, sa::StaticArray) where {SA<:Scalar} = SA((sa[],))
11+
@inline convert(::Type{SA}, sa::StaticArray) where {SA<:Scalar} = SA((sa[],)) # disambiguation
1212
@inline convert(::Type{SA}, sa::SA) where {SA<:StaticArray} = sa
1313
@inline convert(::Type{SA}, x::Tuple) where {SA<:StaticArray} = SA(x) # convert -> constructor. Hopefully no loops...
1414

test/ambiguities.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@ const allowable_ambiguities =
66
4
77
elseif VERSION < v"1.2"
88
2
9-
else
9+
elseif VERSION < v"1.5.0-rc1"
1010
1
11+
else
12+
0
1113
end
1214

1315
@test length(detect_ambiguities(Base, LinearAlgebra, StaticArrays)) <= allowable_ambiguities

0 commit comments

Comments
 (0)