Skip to content

Commit

Permalink
Merge pull request #153 from JuliaLang/tk/precompilefix
Browse files Browse the repository at this point in the history
Add a default value for the input to __precompile__
  • Loading branch information
stevengj committed Oct 14, 2015
2 parents 95b2523 + f097b03 commit 659ac79
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ Currently, the `@compat` macro supports the following syntaxes:

* `Timer(timeout::Real, repeat::Real=0.0)` and `Timer(cb::Function, timeout::Real, repeat::Real=0.0)` allow julia 0.4-style Timers to be constructed and used.

* `__precompile(iscompiled::Bool)__` and `include_dependency(path::AbstractString)` allow
* `__precompile__(iscompiled::Bool)` and `include_dependency(path::AbstractString)` allow
Julia 0.4 precompilation information to be provided (with no effect in earlier versions).
(However, to enable precompiling in 0.4, it is better to explicitly put `VERSION >= v"0.4.0-dev+6521" && __precompile__()` before your `module` statement, so that Julia knows to precompile before anything in your module is evaluated.)

Expand Down
2 changes: 1 addition & 1 deletion src/Compat.jl
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,7 @@ if VERSION < v"0.4.0-dev+5697"
end

if VERSION < v"0.4.0-dev+6521"
__precompile__(::Bool) = nothing
__precompile__(isprecompilable::Bool = true) = nothing
export __precompile__
end

Expand Down
1 change: 1 addition & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,7 @@ Compat.@irrational mathconst_one 1.0 big(1.)
@test base64encode("hello world") == "aGVsbG8gd29ybGQ="

@test nothing === __precompile__(false) # tests should never be precompiled
@test nothing === __precompile__()
@test nothing === include_dependency("foo")

@test real(Int) == real(Complex{Int}) == Int
Expand Down

0 comments on commit 659ac79

Please sign in to comment.