Skip to content

Commit cf8e27d

Browse files
committed
Merge pull request #9452 from JuliaLang/teh/val
Add wrapper for passing constants through type inference
2 parents bfa51bb + 7084497 commit cf8e27d

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

base/base.jl

+4
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,10 @@ type DimensionMismatch <: Exception
117117
end
118118
DimensionMismatch() = DimensionMismatch("")
119119

120+
# For passing constants through type inference
121+
immutable Val{T}
122+
end
123+
120124
type WeakRef
121125
value
122126
WeakRef() = WeakRef(nothing)

base/exports.jl

+1
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ export
113113
UnitRange,
114114
UTF16String,
115115
UTF32String,
116+
Val,
116117
VecOrMat,
117118
Vector,
118119
VersionNumber,

0 commit comments

Comments
 (0)