File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -23,15 +23,15 @@ struct VarName{sym, T<:Tuple}
23
23
indexing:: T
24
24
end
25
25
26
- VarName (sym:: Symbol , indexing:: T = ()) where {T} = VarName {sym, T } (indexing)
26
+ VarName (sym:: Symbol , indexing:: Tuple = ()) = VarName {sym, typeof(indexing) } (indexing)
27
27
28
28
"""
29
29
VarName(vn::VarName, indexing)
30
30
31
31
Return a copy of `vn` with a new index `indexing`.
32
32
"""
33
- function VarName (vn:: VarName{sym} , indexing:: T = ()) where {sym, T}
34
- return VarName {sym, T } (indexing)
33
+ function VarName (vn:: VarName , indexing:: Tuple = ())
34
+ return VarName {getsym(vn), typeof(indexing) } (indexing)
35
35
end
36
36
37
37
@@ -52,7 +52,7 @@ getindexing(vn::VarName) = vn.indexing
52
52
53
53
54
54
Base. hash (vn:: VarName , h:: UInt ) = hash ((getsym (vn), getindexing (vn)), h)
55
- Base.:(== )(x:: VarName{S} , y:: VarName{T} ) where {S, T} = S == T && getindexing (x) == getindexing (y)
55
+ Base.:(== )(x:: VarName , y:: VarName ) = getsym (x) == getsym (y) && getindexing (x) == getindexing (y)
56
56
57
57
function Base. show (io:: IO , vn:: VarName )
58
58
print (io, getsym (vn))
You can’t perform that action at this time.
0 commit comments