@@ -10,7 +10,7 @@ function sausage(x)
1010 deserialize(buf)
1111end
1212
13- @auto_hash_equals type A
13+ @auto_hash_equals struct A
1414 a:: Int
1515 b
1616end
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
3939end
4040G() = G{Void}(nothing )
@@ -51,7 +51,7 @@ macro dummy(x)
5151end
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
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
6868end
@@ -76,7 +76,7 @@ macro cond(test, block)
7676end
7777
7878""" this is my data type"""
79- @auto_hash_equals type MyType
79+ @auto_hash_equals mutable struct MyType
8080 field:: Int
8181end
8282@test plain(@doc MyType) == " this is my data type\n "
0 commit comments