We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
==
Some
1 parent 6a1df3d commit fea7616Copy full SHA for fea7616
base/some.jl
@@ -145,3 +145,5 @@ macro something(args...)
145
something = GlobalRef(Base, :something)
146
return :($something($expr))
147
end
148
+
149
+==(a::Some, b::Some) = a.value == b.value
test/some.jl
@@ -49,6 +49,13 @@
49
@test !isequal(Some(1), nothing)
50
@test !isequal(Some(nothing), nothing)
51
52
+# Some with something else is false
53
+@test !=(Some(nothing), nothing)
54
+@test !=(nothing, Some(nothing))
55
56
+# Two Somes forward to their wrapped things
57
+@test ==(Some([0x1]), Some([1]))
58
59
@testset "something" begin
60
@test_throws ArgumentError something()
61
@test something(1) === 1
0 commit comments