Skip to content

Commit a25b729

Browse files
authored
Merge pull request #12 from christopher-dG/cdg/deprecations
Fix deprecations
2 parents 4d58462 + a089c28 commit a25b729

File tree

4 files changed

+12
-13
lines changed

4 files changed

+12
-13
lines changed

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ os:
33
- linux
44
- osx
55
julia:
6-
- 0.5
76
- 0.6
87
- nightly
98
notifications:

REQUIRE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
julia 0.5
1+
julia 0.6

src/AutoHashEquals.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ function auto_equals(name, names)
3838
end
3939
end
4040

41-
type UnpackException <: Exception
41+
struct UnpackException <: Exception
4242
msg
4343
end
4444

test/runtests.jl

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ function sausage(x)
1010
deserialize(buf)
1111
end
1212

13-
@auto_hash_equals type A
13+
@auto_hash_equals struct A
1414
a::Int
1515
b
1616
end
@@ -21,9 +21,9 @@ end
2121
@test A(1,2) != A(1,3)
2222
@test A(1,2) != A(3,2)
2323

24-
abstract B
25-
@auto_hash_equals immutable C<:B x::Int end
26-
@auto_hash_equals immutable D<:B x::Int end
24+
abstract type B end
25+
@auto_hash_equals struct C<:B x::Int end
26+
@auto_hash_equals struct D<:B x::Int end
2727
@test isa(C(1), B)
2828
@test isa(D(1), B)
2929
@test C(1) != D(1)
@@ -32,9 +32,9 @@ abstract B
3232
@test C(1) == sausage(C(1))
3333
@test hash(C(1)) == hash(C(1))
3434

35-
abstract E{N<:Union{Void,Int}}
36-
@auto_hash_equals type F{N}<:E{N} e::N end
37-
@auto_hash_equals type G{N}<:E{N}
35+
abstract type E{N<:Union{Void,Int}} end
36+
@auto_hash_equals mutable struct F{N}<:E{N} e::N end
37+
@auto_hash_equals mutable struct G{N}<:E{N}
3838
e::N
3939
end
4040
G() = G{Void}(nothing)
@@ -51,7 +51,7 @@ macro dummy(x)
5151
end
5252
@test @dummy(1) == 1
5353

54-
@auto_hash_equals type H
54+
@auto_hash_equals mutable struct H
5555
@dummy h
5656
i
5757
@dummy j::Int
@@ -62,7 +62,7 @@ end
6262
@test hash(H(1,2,3)) == hash(H(1,2,3))
6363
@test hash(H(1,2,3)) != hash(H(2,1,3))
6464

65-
@auto_hash_equals immutable I{A,B}
65+
@auto_hash_equals struct I{A,B}
6666
a::A
6767
b::B
6868
end
@@ -76,7 +76,7 @@ macro cond(test, block)
7676
end
7777

7878
"""this is my data type"""
79-
@auto_hash_equals type MyType
79+
@auto_hash_equals mutable struct MyType
8080
field::Int
8181
end
8282
@test plain(@doc MyType) == "this is my data type\n"

0 commit comments

Comments
 (0)