Skip to content

Commit 86bbc56

Browse files
committed
fixes propertynames() methods
calls fieldnames(typeof(x)) instead of fieldnames(x) fixes #191
1 parent 900364b commit 86bbc56

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "Clustering"
22
uuid = "aaaa29a8-35af-508c-8bc3-b662a17a0fe5"
3-
version = "0.13.4"
3+
version = "0.13.5"
44

55
[deps]
66
Distances = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7"

src/deprecate.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
# FIXME remove after deprecation period for merge/labels/height/method
1616
Base.propertynames(hclu::Hclust, private::Bool = false) =
17-
(fieldnames(hclu)...,
17+
(fieldnames(typeof(hclu))...,
1818
#= deprecated as of 0.12 =# :height, :labels, :merge, :method)
1919

2020
# FIXME remove after deprecation period for merge/labels/height/method
@@ -38,7 +38,7 @@ end
3838

3939
# FIXME remove after deprecation period for cweights
4040
Base.propertynames(clu::KmeansResult, private::Bool = false) =
41-
(fieldnames(clu)..., #= deprecated as of 0.13.2 =# :cweights)
41+
(fieldnames(typeof(clu))..., #= deprecated as of 0.13.2 =# :cweights)
4242

4343
# FIXME remove after deprecation period for cweights
4444
@inline function Base.getproperty(clu::KmeansResult, prop::Symbol)
@@ -53,7 +53,7 @@ end
5353

5454
# FIXME remove after deprecation period for acosts
5555
Base.propertynames(kmed::KmedoidsResult, private::Bool = false) =
56-
(fieldnames(kmed)..., #= deprecated since v0.13.4=# :acosts)
56+
(fieldnames(typeof(kmed))..., #= deprecated since v0.13.4=# :acosts)
5757

5858
# FIXME remove after deprecation period for acosts
5959
function Base.getproperty(kmed::KmedoidsResult, prop::Symbol)

0 commit comments

Comments
 (0)