Skip to content

Commit

Permalink
fix SqSMatrix ambiguity that impacted a KVec constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
thchr committed Apr 21, 2021
1 parent f3e04a0 commit 3765bfd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "Crystalline"
uuid = "ae5e2be0-a263-11e9-351e-f94dad1eb351"
authors = ["Thomas Christensen <[email protected]>"]
version = "0.3.4"
version = "0.3.5"

[deps]
Combinatorics = "861a8166-3701-5b0c-9a16-15d98fcdc6aa"
Expand Down
1 change: 1 addition & 0 deletions src/SquareStaticMatrices.jl
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ end
D = checksquare(A)
@inbounds SqSMatrix{D}(A::AbstractMatrix{T})
end
SqSMatrix{D,T}(A::SqSMatrix{D,T}) where {D,T} = A # resolve an ambiguity (StaticMatrix vs. AbstractMatrix)

function flatten_nested(cols::NTuple{D, NTuple{D, T}}) where {D,T}
ntuple(Val{D*D}()) do idx
Expand Down
2 changes: 2 additions & 0 deletions test/kvecs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ using Test, Crystalline, StaticArrays, LinearAlgebra
@test KVec{3}("u,v,0.5")([.7,.2,.3]) == [.7,.2,.5]
@test KVec{3}("v,u,0.5")([.7,.2,.3]) == [.2,.7,.5]

@test KVec([0.0,1//1,2]) == KVec{3}("0,1,2")

@test zero(KVec{3}) == KVec{3}("0,0,0") == zero(KVec{3}("1,2,3"))
end

Expand Down

2 comments on commit 3765bfd

@thchr
Copy link
Owner Author

@thchr thchr commented on 3765bfd Apr 21, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/34869

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.3.5 -m "<description of version>" 3765bfd0794cc677c470bf8047c59badaaa12381
git push origin v0.3.5

Please sign in to comment.