Skip to content

Commit 659ac79

Browse files
committed
Merge pull request #153 from JuliaLang/tk/precompilefix
Add a default value for the input to __precompile__
2 parents 95b2523 + f097b03 commit 659ac79

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ Currently, the `@compat` macro supports the following syntaxes:
9393

9494
* `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.
9595

96-
* `__precompile(iscompiled::Bool)__` and `include_dependency(path::AbstractString)` allow
96+
* `__precompile__(iscompiled::Bool)` and `include_dependency(path::AbstractString)` allow
9797
Julia 0.4 precompilation information to be provided (with no effect in earlier versions).
9898
(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.)
9999

src/Compat.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -633,7 +633,7 @@ if VERSION < v"0.4.0-dev+5697"
633633
end
634634

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

test/runtests.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,7 @@ Compat.@irrational mathconst_one 1.0 big(1.)
448448
@test base64encode("hello world") == "aGVsbG8gd29ybGQ="
449449

450450
@test nothing === __precompile__(false) # tests should never be precompiled
451+
@test nothing === __precompile__()
451452
@test nothing === include_dependency("foo")
452453

453454
@test real(Int) == real(Complex{Int}) == Int

0 commit comments

Comments
 (0)