eliminate ambiguity
This commit is contained in:
parent
ff2caf032c
commit
2ec37790be
@ -61,7 +61,7 @@ for (M, f, arity) in DiffRules.diffrules()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Eliminating ambiguous
|
# Eliminating ambiguity
|
||||||
import Base:^
|
import Base:^
|
||||||
|
|
||||||
^(a::TrackedReal, b::Integer) = track(^, a, b)
|
^(a::TrackedReal, b::Integer) = track(^, a, b)
|
||||||
|
@ -75,6 +75,8 @@ end
|
|||||||
|
|
||||||
@test (param([1,2,3]) .< 2) == [true, false, false]
|
@test (param([1,2,3]) .< 2) == [true, false, false]
|
||||||
|
|
||||||
|
@test param(2)^2 == 4.0
|
||||||
|
|
||||||
@testset "Intermediates" begin
|
@testset "Intermediates" begin
|
||||||
x = param([1])
|
x = param([1])
|
||||||
l = sum((x .+ x).^2)
|
l = sum((x .+ x).^2)
|
||||||
|
Loading…
Reference in New Issue
Block a user