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.
promote_rule
Some
1 parent fd52126 commit 179a9a1Copy full SHA for 179a9a1
base/some.jl
@@ -14,8 +14,6 @@ end
14
15
Some(::Type{T}) where {T} = Some{Type{T}}(T)
16
17
-promote_rule(::Type{Some{T}}, ::Type{Some{S}}) where {T, S<:T} = Some{T}
18
-
19
nonnothingtype(@nospecialize(T::Type)) = typesplit(T, Nothing)
20
promote_rule(T::Type{Nothing}, S::Type) = Union{S, Nothing}
21
function promote_rule(T::Type{>:Nothing}, S::Type)
test/some.jl
@@ -3,7 +3,7 @@
3
## promote()
4
5
@test promote_type(Some{Int}, Some{Float64}) == Some
6
-@test promote_type(Some{Int}, Some{Real}) == Some{Real}
+@test promote_type(Some{Int}, Some{Real}) == Some
7
@test promote_type(Some{Int}, Nothing) == Union{Some{Int},Nothing}
8
9
## convert()
0 commit comments