Skip to content

Commit

Permalink
fix JuliaLang#34921, keywordargs test breaks precompile test (JuliaLa…
Browse files Browse the repository at this point in the history
  • Loading branch information
Keno authored and ravibitsgoa committed Apr 6, 2020
1 parent 3b22a6d commit cd88533
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions test/precompile.jl
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ try
(::Task)(::UInt8, ::UInt16, ::UInt32) = 2
# issue 16471 (capturing references to a kwfunc)
Test.@test !isdefined(Base.Nothing.name.mt, :kwsorter)
Base.nothing(::UInt8, ::UInt16, ::UInt32; x = 52) = x
const nothingkw = Core.kwfunc(Base.nothing)
Test.@test !isdefined(typeof(sin).name.mt, :kwsorter)
Base.sin(::UInt8, ::UInt16, ::UInt32; x = 52) = x
const sinkw = Core.kwfunc(Base.sin)
# issue 16908 (some complicated types and external method definitions)
abstract type CategoricalPool{T, R <: Integer, V} end
Expand Down Expand Up @@ -172,8 +172,8 @@ try
const layout3 = collect(x.match for x in eachmatch(r"..", "abcdefghijk"))::Vector{SubString{String}}
end
""")
# make sure `nothing` didn't have a kwfunc (which would invalidate the attempted test)
@test !isdefined(Base.Nothing.name.mt, :kwsorter)
# make sure `sin` didn't have a kwfunc (which would invalidate the attempted test)
@test !isdefined(typeof(sin).name.mt, :kwsorter)

# Issue #12623
@test __precompile__(false) === nothing
Expand Down Expand Up @@ -281,9 +281,9 @@ try
@test discard_module.(deps) == deps1

@test current_task()(0x01, 0x4000, 0x30031234) == 2
@test nothing(0x01, 0x4000, 0x30031234) == 52
@test nothing(0x01, 0x4000, 0x30031234; x = 9142) == 9142
@test Foo.nothingkw === Core.kwfunc(Base.nothing)
@test sin(0x01, 0x4000, 0x30031234) == 52
@test sin(0x01, 0x4000, 0x30031234; x = 9142) == 9142
@test Foo.sinkw === Core.kwfunc(Base.sin)

@test Foo.NominalValue() == 1
@test Foo.OrdinalValue() == 1
Expand Down

0 comments on commit cd88533

Please sign in to comment.