Skip to content

Commit

Permalink
Merge pull request #9452 from JuliaLang/teh/val
Browse files Browse the repository at this point in the history
Add wrapper for passing constants through type inference
  • Loading branch information
timholy committed Dec 27, 2014
2 parents bfa51bb + 7084497 commit cf8e27d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions base/base.jl
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,10 @@ type DimensionMismatch <: Exception
end
DimensionMismatch() = DimensionMismatch("")

# For passing constants through type inference
immutable Val{T}
end

type WeakRef
value
WeakRef() = WeakRef(nothing)
Expand Down
1 change: 1 addition & 0 deletions base/exports.jl
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ export
UnitRange,
UTF16String,
UTF32String,
Val,
VecOrMat,
Vector,
VersionNumber,
Expand Down

0 comments on commit cf8e27d

Please sign in to comment.