-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Open
Labels
bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behaviorcompiler:precompilationPrecompilation of modulesPrecompilation of modulesdisplay and printingAesthetics and correctness of printed representations of objects.Aesthetics and correctness of printed representations of objects.
Description
When using --trace-compile
with Julia 1.7.0-DEV.77 (80ace52) I can use the following code:
using Dates
f(::Val{Hour(1)}) = ""
f(Val(Hour(1)))
to generate this precompile statement:
precompile(Tuple{typeof(Main.f), Base.Val{Dates.Hour(value=1)}})
Attempting to use this precompile statement values as Hour
doesn't have a keyword constructor:
ERROR: MethodError: no method matching Hour(; value=1)
Closest candidates are:
(::Type{T})(::Period) where T<:Period at /Users/omus/Development/Julia/latest/usr/share/julia/stdlib/v1.7/Dates/src/periods.jl:404 got unsupported keyword argument "value"
Hour(::Number) at /Users/omus/Development/Julia/latest/usr/share/julia/stdlib/v1.7/Dates/src/types.jl:34 got unsupported keyword argument "value"
Hour(::AbstractString) at /Users/omus/Development/Julia/latest/usr/share/julia/stdlib/v1.7/Dates/src/periods.jl:23 got unsupported keyword argument "value"
...
Stacktrace:
[1] top-level scope
@ REPL[3]:1
Related to: #28808
Metadata
Metadata
Assignees
Labels
bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behaviorcompiler:precompilationPrecompilation of modulesPrecompilation of modulesdisplay and printingAesthetics and correctness of printed representations of objects.Aesthetics and correctness of printed representations of objects.