-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Closed
Labels
bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behaviorregressionRegression in behavior compared to a previous versionRegression in behavior compared to a previous version
Milestone
Description
One of the tests of https://gitlab.kuleuven.be/ppw-okpiv/research/GradientDiffusion.jl/ fails in Julia 1.9-beta/rc1 with ERROR: TypeError: in Vararg, in type, expected Type, got Vararg{Union{Float64, AbstractArray}}. In Julia 1.8 it works without issues.
This is a minimal working/failing example:
module j
struct k{
b,
c}
d
function k(e::Vararg{Union{b, AbstractArray}}) where b
c = Union
new{b, c}(e)
end
end
l(a) = getfield(a, :d)
function a(b, c)
c(l(b[])...)
end
function o(a)
function(b, ::Vararg{Union{c, AbstractArray}}) where {c, d}
end
end
function fit(z, f, d)
b = [ k([0.], 0.) ]
a(b, (i...) -> d(z, i...))
end
end
c = d = []
j.fit(j, d, j.o(c))Output in Julia 1.8:
Output in Julia 1.9:
ERROR: TypeError: in Vararg, in type, expected Type, got Vararg{Union{Float64, AbstractArray}}
Stacktrace:
[1] (::Main.j.var"#3#4"{Module, Main.j.var"#1#2"})(::Vector{Float64}, ::Vararg{Any})
@ Main.j .\REPL[7]:21
[2] a
@ .\REPL[7]:13 [inlined]
[3] fit(z::Module, f::Vector{Any}, d::Function)
@ Main.j .\REPL[7]:21
[4] top-level scope
@ REPL[9]:1
The example is reproducible in Windows and Linux.
i.e. of versioninfo():
Julia Version 1.9.0-rc1
Commit 3b2e0d8fbc (2023-03-07 07:51 UTC)
Platform Info:
OS: Windows (x86_64-w64-mingw32)
CPU: 8 × Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-14.0.6 (ORCJIT, skylake)
Threads: 8 on 8 virtual cores
Environment:
JULIA_EDITOR = code
Metadata
Metadata
Assignees
Labels
bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behaviorregressionRegression in behavior compared to a previous versionRegression in behavior compared to a previous version