Skip to content

Commit

Permalink
remove method definition for Int in test/core.jl (#40380)
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffBezanson authored Apr 8, 2021
1 parent d3b012b commit 1defc11
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions test/core.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2389,19 +2389,14 @@ let ex = Expr(:(=), :(f8338(x;y=4)), :(x*y))
end

# call overloading (#2403)
(x::Int)(y::Int) = x + 3y
issue2403func(f) = f(7)
let x = 10
@test x(3) == 19
@test x((3,)...) == 19
@test issue2403func(x) == 31
end
mutable struct Issue2403
x
end
(i::Issue2403)(y) = i.x + 2y
let x = Issue2403(20)
@test x(3) == 26
@test x((3,)...) == 26
@test issue2403func(x) == 34
end

Expand Down

0 comments on commit 1defc11

Please sign in to comment.