diff --git a/Project.toml b/Project.toml index a8ea16a25..717c707ab 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "Zygote" uuid = "e88e6eb3-aa80-5325-afca-941959d7151f" -version = "0.6.30" +version = "0.6.31" [deps] AbstractFFTs = "621f4979-c628-5d54-868e-fcf4e3e8185c" diff --git a/src/lib/literal_getproperty.jl b/src/lib/literal_getproperty.jl index 1959e9462..c13f7a89b 100644 --- a/src/lib/literal_getproperty.jl +++ b/src/lib/literal_getproperty.jl @@ -29,7 +29,11 @@ function reflect(@nospecialize(sigtypes::Tuple), world::UInt = typemax(UInt)) end method_index === 0 && return nothing type_signature, raw_static_params, method = _methods[method_index] - method_instance = Core.Compiler.specialize_method(method, type_signature, raw_static_params, false) + if VERSION < v"1.8-" + method_instance = Core.Compiler.specialize_method(method, type_signature, raw_static_params, false) + else + method_instance = Core.Compiler.specialize_method(method, type_signature, raw_static_params; preexisting=false) + end method_signature = method.sig static_params = Any[raw_static_params...] return method_instance, method_signature, static_params