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.
typejoin
1 parent 94e4082 commit e1739aaCopy full SHA for e1739aa
base/promotion.jl
@@ -3,10 +3,19 @@
3
## type join (closest common ancestor, or least upper bound) ##
4
5
"""
6
- typejoin(T, S)
+ typejoin(T, S, ...)
7
8
-Return the closest common ancestor of `T` and `S`, i.e. the narrowest type from which
9
-they both inherit.
+Return the closest common ancestor of types `T` and `S`, i.e. the narrowest type from which
+they both inherit. Recurses on additional varargs.
10
+
11
+# Examples
12
+```jldoctest
13
+julia> typejoin(Int, Float64)
14
+Real
15
16
+julia> typejoin(Int, Float64, ComplexF32)
17
+Number
18
+```
19
20
typejoin() = Bottom
21
typejoin(@nospecialize(t)) = t
0 commit comments