In julia 0.7
julia> using JuMP
julia> m=Model()
WARNING: Base.ObjectIdDict is deprecated, use IdDict{Any, Any} instead.
in module JuMP
WARNING: Base.ObjectIdDict is deprecated, use IdDict{Any, Any} instead.
in module JuMP
WARNING: Base.ObjectIdDict is deprecated, use IdDict{Any, Any} instead.
in module JuMP
WARNING: Base.ObjectIdDict is deprecated, use IdDict{Any, Any} instead.
in module JuMP
WARNING: Base.ObjectIdDict is deprecated, use IdDict{Any, Any} instead.
in module JuMP
WARNING: Base.ObjectIdDict is deprecated, use IdDict{Any, Any} instead.
in module JuMP
WARNING: Base.ObjectIdDict is deprecated, use IdDict{Any, Any} instead.
in module JuMP
WARNING: Base.ObjectIdDict is deprecated, use IdDict{Any, Any} instead.
in module JuMP
WARNING: Base.ObjectIdDict is deprecated, use IdDict{Any, Any} instead.
in module JuMP
WARNING: Base.ObjectIdDict is deprecated, use IdDict{Any, Any} instead.
in module JuMP
WARNING: Base.ObjectIdDict is deprecated, use IdDict{Any, Any} instead.
in module JuMP
WARNING: Base.ObjectIdDict is deprecated, use IdDict{Any, Any} instead.
in module JuMP
WARNING: Base.ObjectIdDict is deprecated, use IdDict{Any, Any} instead.
in module JuMP
WARNING: Base.ObjectIdDict is deprecated, use IdDict{Any, Any} instead.
in module JuMP
WARNING: Base.ObjectIdDict is deprecated, use IdDict{Any, Any} instead.
in module JuMP
Feasibility problem with:
* 0 linear constraints
* 0 variables
Solver is default solver
julia> @variable(m,x)
┌ Warning: `shift!` is deprecated, use `popfirst!` instead.
│ caller = @variable(::LineNumberNode, ::Module, ::Vararg{Any,N} where N) at macros.jl:887
└ @ JuMP ~/.julia/packages/JuMP/6aWuF/src/macros.jl:887
x
julia> @NLobjective(m,Min,cosd(x))
┌ Warning: `Array{T, 1}(m::Int) where T` is deprecated, use `Array{T, 1}(undef, m)` instead.
│ caller = ReverseDiffSparse.UserOperatorRegistry() at types.jl:72
└ @ ReverseDiffSparse ~/.julia/packages/ReverseDiffSparse/8BEQH/src/types.jl:72
ERROR: cosd is not defined for type Variable. Are you trying to build a nonlinear problem? Make sure you use @NLconstraint/@NLobjective.
Stacktrace:
[1] error(::String) at ./error.jl:33
[2] cosd(::Variable) at /home/bgodard/.julia/packages/JuMP/6aWuF/src/operators.jl:597
[3] top-level scope at /home/bgodard/.julia/packages/JuMP/6aWuF/src/parsenlp.jl:226
[4] top-level scope at /home/bgodard/.julia/packages/JuMP/6aWuF/src/macros.jl:1157
julia> methods(cosd)
# 7 methods for generic function "cosd":
[1] cosd(::Variable) in JuMP at /home/bgodard/.julia/packages/JuMP/6aWuF/src/operators.jl:597
[2] cosd(::JuMP.GenericAffExpr{Float64,Variable}) in JuMP at /home/bgodard/.julia/packages/JuMP/6aWuF/src/operators.jl:597
[3] cosd(::JuMP.GenericQuadExpr{Float64,Variable}) in JuMP at /home/bgodard/.julia/packages/JuMP/6aWuF/src/operators.jl:597
[4] cosd(d::ForwardDiff.Dual{T,V,N} where N where V<:Real) where T in ForwardDiff at /home/bgodard/.julia/packages/ForwardDiff/2v3a4/src/dual.jl:166
[5] cosd(x::Real) in Base.Math at special/trig.jl:1049
[6] cosd(x::SparseArrays.AbstractSparseArray{#s565,#s564,1} where #s564<:Integer where #s565<:Number) in SparseArrays at deprecated.jl:53
[7] cosd(z) in Base.Math at special/trig.jl:1081
This used to work in 0.6