FemtoCleaner.jl
FemtoCleaner.jl copied to clipboard
Incorrect bot action in JuliaGeometry/Meshing.jl
@rdeits has indicated an incorrect bot action in https://github.com/JuliaGeometry/Meshing.jl/pull/17 The relevant snippets are shown below:
@@ -412,6 +412,6 @@ end
MarchingCubes(iso::T1=0.0, eps::T2=1e-3) where {T1, T2} = MarchingCubes{promote_type(T1, T2)}(iso, eps)
-function (::Type{MT})(df::SignedDistanceField, method::MarchingCubes)::MT where {MT <: AbstractMesh}
+function MT(df::SignedDistanceField, method::MarchingCubes)::MT where {MT <: AbstractMesh}
Here's the code before (in minimal form):
julia> struct Foo{T}
x::T
end
julia> (::Type{F})(x, y) where {F <: Foo} = Foo(x + y)
julia> Foo(1, 2)
Foo{Int64}(3)
and here's what FemtoCleaner produced:
julia> struct Foo{T}
x::T
end
julia> F(x, y) where {F <: Foo} = Foo(x + y)
F (generic function with 0 methods)
julia> Foo(1, 2)
ERROR: MethodError: no method matching Foo(::Int64, ::Int64)
Closest candidates are:
Foo(::T) where T at REPL[1]:2
Stacktrace:
[1] top-level scope at none:0