Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AssertionError: kind(sig) == K"call" #433

Closed
jishnub opened this issue Apr 17, 2023 · 1 comment · Fixed by #437
Closed

AssertionError: kind(sig) == K"call" #433

jishnub opened this issue Apr 17, 2023 · 1 comment · Fixed by #437

Comments

@jishnub
Copy link
Contributor

jishnub commented Apr 17, 2023

julia> using ApproxFun, LinearAlgebra

julia> Σ = DefiniteIntegral(Chebyshev());

julia> x = Fun();

julia> @descend_code_warntype exp(x)*Σ[cos(x)]
*(f::Fun, A::Operator) @ ApproxFunBase ~/Dropbox/JuliaPackages/ApproxFunBase/src/Operators/general/algebra.jl:641
┌ Warning: Some line information is missing, type-assignment may be incomplete
└ @ Cthulhu ~/.julia/packages/Cthulhu/x6R6H/src/codeview.jl:117
641 function *(f::Fun{Chebyshev{ChebyshevInterval{Float64}, Float64}, Float64, Vector{Float64}}::Fun, A::TimesOperator{Float64, Tuple{Int64, Infinities.InfiniteCardinal{0}}, Tuple{Int64, Infinities.InfiniteCardinal{0}}, Operator{Float64}, Tuple{Int64, Infinities.InfiniteCardinal{0}}, Tuple{Int64, Int64}}::Operator)::Union{LowRankOperator{Chebyshev{ChebyshevInterval{Float64}, Float64}, Float64, TimesOperator{Float64, Tuple{Int64, Infinities.InfiniteCardinal{0}}, Tuple{Int64, Infinities.InfiniteCardinal{0}}, Operator{Float64}, Tuple{Int64, Infinities.InfiniteCardinal{0}}, Tuple{Int64, Int64}}}, TimesOperator}
642         _mulop(f::Fun{Chebyshev{ChebyshevInterval{Float64}, Float64}, Float64, Vector{Float64}}, A::TimesOperator{Float64, Tuple{Int64, Infinities.InfiniteCardinal{0}}, Tuple{Int64, Infinities.InfiniteCardinal{0}}, Operator{Float64}, Tuple{Int64, Infinities.InfiniteCardinal{0}}, Tuple{Int64, Int64}})::Union{LowRankOperator{Chebyshev{ChebyshevInterval{Float64}, Float64}, Float64, TimesOperator{Float64, Tuple{Int64, Infinities.InfiniteCardinal{0}}, Tuple{Int64, Infinities.InfiniteCardinal{0}}, Operator{Float64}, Tuple{Int64, Infinities.InfiniteCardinal{0}}, Tuple{Int64, Int64}}}, TimesOperator}
643     end
Select a call to descend into or  to ascend. [q]uit. [b]ookmark.
Toggles: [w]arn, [h]ide type-stable statements, [t]ype annotations, [s]yntax highlight for Source/LLVM/Native.
Show: [S]ource code, [A]ST, [T]yped code, [L]LVM IR, [N]ative code
Actions: [E]dit source code, [R]evise and redisplay
 • 642 _mulop(f::Fun{Chebyshev{ChebyshevInterval{Float64}, Float64}, Float64, Vector{Float64}}, A::TimesOperator{Float64, Tuple{Int64, Infinities.InfiniteCardinal{0}}, Tuple{Int64, Infi
   
_mulop(f::Fun, A::Operator) @ ApproxFunBase ~/Dropbox/JuliaPackages/ApproxFunBase/src/Operators/general/algebra.jl:632
┌ Warning: Some line information is missing, type-assignment may be incomplete
└ @ Cthulhu ~/.julia/packages/Cthulhu/x6R6H/src/codeview.jl:117
632 function _mulop(f::Fun{Chebyshev{ChebyshevInterval{Float64}, Float64}, Float64, Vector{Float64}}::Fun, A::TimesOperator{Float64, Tuple{Int64, Infinities.InfiniteCardinal{0}}, Tuple{Int64, Infinities.InfiniteCardinal{0}}, Operator{Float64}, Tuple{Int64, Infinities.InfiniteCardinal{0}}, Tuple{Int64, Int64}}::Operator)::Union{LowRankOperator{Chebyshev{ChebyshevInterval{Float64}, Float64}, Float64, TimesOperator{Float64, Tuple{Int64, Infinities.InfiniteCardinal{0}}, Tuple{Int64, Infinities.InfiniteCardinal{0}}, Operator{Float64}, Tuple{Int64, Infinities.InfiniteCardinal{0}}, Tuple{Int64, Int64}}}, TimesOperator}
633     if isafunctional(A::TimesOperator{Float64, Tuple{Int64, Infinities.InfiniteCardinal{0}}, Tuple{Int64, Infinities.InfiniteCardinal{0}}, Operator{Float64}, Tuple{Int64, Infinities.InfiniteCardinal{0}}, Tuple{Int64, Int64}})::Bool && (isinf(bandwidth(A::TimesOperator{Float64, Tuple{Int64, Infinities.InfiniteCardinal{0}}, Tuple{Int64, Infinities.InfiniteCardinal{0}}, Operator{Float64}, Tuple{Int64, Infinities.InfiniteCardinal{0}}, Tuple{Int64, Int64}}, 1)::Int64) || isinf(bandwidth(A::TimesOperator{Float64, Tuple{Int64, Infinities.InfiniteCardinal{0}}, Tuple{Int64, Infinities.InfiniteCardinal{0}}, Operator{Float64}, Tuple{Int64, Infinities.InfiniteCardinal{0}}, Tuple{Int64, Int64}}, 2)::Infinities.InfiniteCardinal{0})::Bool)
634         LowRankOperator::Type{LowRankOperator}(f::Fun{Chebyshev{ChebyshevInterval{Float64}, Float64}, Float64, Vector{Float64}}, A::TimesOperator{Float64, Tuple{Int64, Infinities.InfiniteCardinal{0}}, Tuple{Int64, Infinities.InfiniteCardinal{0}}, Operator{Float64}, Tuple{Int64, Infinities.InfiniteCardinal{0}}, Tuple{Int64, Int64}})::LowRankOperator{Chebyshev{ChebyshevInterval{Float64}, Float64}, Float64, TimesOperator{Float64, Tuple{Int64, Infinities.InfiniteCardinal{0}}, Tuple{Int64, Infinities.InfiniteCardinal{0}}, Operator{Float64}, Tuple{Int64, Infinities.InfiniteCardinal{0}}, Tuple{Int64, Int64}}}
635     else
636         TimesOperator::Type{TimesOperator}(Multiplication::Type{Multiplication}(f::Fun{Chebyshev{ChebyshevInterval{Float64}, Float64}, Float64, Vector{Float64}}, rangespace(A::TimesOperator{Float64, Tuple{Int64, Infinities.InfiniteCardinal{0}}, Tuple{Int64, Infinities.InfiniteCardinal{0}}, Operator{Float64}, Tuple{Int64, Infinities.InfiniteCardinal{0}}, Tuple{Int64, Int64}})::Any)::Any, A::TimesOperator{Float64, Tuple{Int64, Infinities.InfiniteCardinal{0}}, Tuple{Int64, Infinities.InfiniteCardinal{0}}, Operator{Float64}, Tuple{Int64, Infinities.InfiniteCardinal{0}}, Tuple{Int64, Int64}})::TimesOperator
637     end
638 end
Select a call to descend into or  to ascend. [q]uit. [b]ookmark.
Toggles: [w]arn, [h]ide type-stable statements, [t]ype annotations, [s]yntax highlight for Source/LLVM/Native.
Show: [S]ource code, [A]ST, [T]yped code, [L]LVM IR, [N]ative code
Actions: [E]dit source code, [R]evise and redisplay
 • 633 isafunctional(A::TimesOperator{Float64, Tuple{Int64, Infinities.InfiniteCardinal{0}}, Tuple{Int64, Infinities.InfiniteCardinal{0}}, Operator{Float64}, Tuple{Int64, Infinities.Inf
   633 bandwidth(A::TimesOperator{Float64, Tuple{Int64, Infinities.InfiniteCardinal{0}}, Tuple{Int64, Infinities.InfiniteCardinal{0}}, Operator{Float64}, Tuple{Int64, Infinities.Infinit
   %5 = isinf(::Int64)::Core.Const(false)
   633 bandwidth(A::TimesOperator{Float64, Tuple{Int64, Infinities.InfiniteCardinal{0}}, Tuple{Int64, Infinities.InfiniteCardinal{0}}, Operator{Float64}, Tuple{Int64, Infinities.Infinit
   633 isinf(bandwidth(A::TimesOperator{Float64, Tuple{Int64, Infinities.InfiniteCardinal{0}}, Tuple{Int64, Infinities.InfiniteCardinal{0}}, Operator{Float64}, Tuple{Int64, Infinities.I
   634 LowRankOperator::Type{LowRankOperator}(f::Fun{Chebyshev{ChebyshevInterval{Float64}, Float64}, Float64, Vector{Float64}}, A::TimesOperator{Float64, Tuple{Int64, Infinities.Infinit
   636 rangespace(A::TimesOperator{Float64, Tuple{Int64, Infinities.InfiniteCardinal{0}}, Tuple{Int64, Infinities.InfiniteCardinal{0}}, Operator{Float64}, Tuple{Int64, Infinities.Infini
   runtime 636 Multiplication::Type{Multiplication}(f::Fun{Chebyshev{ChebyshevInterval{Float64}, Float64}, Float64, Vector{Float64}}, rangespace(A::TimesOperator{Float64, Tuple{Int64, I
   636 TimesOperator::Type{TimesOperator}(Multiplication::Type{Multiplication}(f::Fun{Chebyshev{ChebyshevInterval{Float64}, Float64}, Float64, Vector{Float64}}, rangespace(A::TimesOpera
   
ERROR: AssertionError: kind(sig) == K"call"
Stacktrace:
  [1] num_positional_args(tsn::JuliaSyntax.TreeNode{TypedSyntax.TypedSyntaxData})
    @ TypedSyntax ~/.julia/packages/TypedSyntax/IuzDP/src/node.jl:339
  [2] truncate_if_defaultargs!(tsn::JuliaSyntax.TreeNode{TypedSyntax.TypedSyntaxData}, mappings::Vector{Vector{Union{JuliaSyntax.TreeNode{JuliaSyntax.SyntaxData}, JuliaSyntax.TreeNode{TypedSyntax.TypedSyntaxData}}}}, meth::Method)
    @ Cthulhu ~/.julia/packages/Cthulhu/x6R6H/src/reflection.jl:367
  [3] get_typed_sourcetext(mi::Core.MethodInstance, src::Core.CodeInfo, rt::Any; warn::Bool)
    @ Cthulhu ~/.julia/packages/Cthulhu/x6R6H/src/reflection.jl:355
  [4] find_callsites(interp::Cthulhu.CthulhuInterpreter, CI::Core.CodeInfo, stmt_infos::Vector{Core.Compiler.CallInfo}, mi::Core.MethodInstance, slottypes::Vector{Any}, optimize::Bool, annotate_source::Bool)
    @ Cthulhu ~/.julia/packages/Cthulhu/x6R6H/src/reflection.jl:28
  [5] _descend(term::REPL.Terminals.TTYTerminal, interp::Cthulhu.CthulhuInterpreter, curs::Cthulhu.CthulhuCursor; override::Nothing, debuginfo::Cthulhu.DInfo.DebugInfo, optimize::Bool, interruptexc::Bool, iswarn::Bool, hide_type_stable::Bool, verbose::Nothing, remarks::Bool, with_effects::Bool, inline_cost::Bool, type_annotations::Bool, annotate_source::Bool)
    @ Cthulhu ~/.julia/packages/Cthulhu/x6R6H/src/Cthulhu.jl:499
  [6] _descend(term::REPL.Terminals.TTYTerminal, interp::Cthulhu.CthulhuInterpreter, curs::Cthulhu.CthulhuCursor; override::Nothing, debuginfo::Cthulhu.DInfo.DebugInfo, optimize::Bool, interruptexc::Bool, iswarn::Bool, hide_type_stable::Bool, verbose::Nothing, remarks::Bool, with_effects::Bool, inline_cost::Bool, type_annotations::Bool, annotate_source::Bool)
    @ Cthulhu ~/.julia/packages/Cthulhu/x6R6H/src/Cthulhu.jl:632
  [7] _descend(term::REPL.Terminals.TTYTerminal, interp::Cthulhu.CthulhuInterpreter, curs::Cthulhu.CthulhuCursor; override::Nothing, debuginfo::Symbol, optimize::Bool, interruptexc::Bool, iswarn::Bool, hide_type_stable::Bool, verbose::Nothing, remarks::Bool, with_effects::Bool, inline_cost::Bool, type_annotations::Bool, annotate_source::Bool)
    @ Cthulhu ~/.julia/packages/Cthulhu/x6R6H/src/Cthulhu.jl:632
  [8] _descend(term::REPL.Terminals.TTYTerminal, interp::Cthulhu.CthulhuInterpreter, mi::Core.MethodInstance; kwargs::Base.Pairs{Symbol, Bool, Tuple{Symbol}, NamedTuple{(:iswarn,), Tuple{Bool}}})
    @ Cthulhu ~/.julia/packages/Cthulhu/x6R6H/src/Cthulhu.jl:768
  [9] _descend(::REPL.Terminals.TTYTerminal, ::Any, ::Vararg{Any}; interp::Core.Compiler.NativeInterpreter, kwargs::Base.Pairs{Symbol, Bool, Tuple{Symbol}, NamedTuple{(:iswarn,), Tuple{Bool}}})
    @ Cthulhu ~/.julia/packages/Cthulhu/x6R6H/src/Cthulhu.jl:784
 [10] __descend_with_error_handling(args::Any; terminal::Any, kwargs::Base.Pairs{Symbol, V, Tuple{Vararg{Symbol, N}}, NamedTuple{names, T}} where {V, N, names, T<:Tuple{Vararg{Any, N}}})
    @ Cthulhu ~/.julia/packages/Cthulhu/x6R6H/src/Cthulhu.jl:242
 [11] _descend_with_error_handling(f::Any, argtypes::Any; kwargs::Base.Pairs{Symbol, Bool, Tuple{Symbol}, NamedTuple{(:iswarn,), Tuple{Bool}}})
    @ Cthulhu ~/.julia/packages/Cthulhu/x6R6H/src/Cthulhu.jl:231
 [12] descend_code_warntype(::Any, ::Vararg{Any}; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ Cthulhu ~/.julia/packages/Cthulhu/x6R6H/src/Cthulhu.jl:207
 [13] descend_code_warntype(::Any, ::Any)
    @ Cthulhu ~/.julia/packages/Cthulhu/x6R6H/src/Cthulhu.jl:207
 [14] top-level scope
    @ REPL[6]:1
@Zentrik
Copy link
Collaborator

Zentrik commented Apr 17, 2023

I've been getting the same error separately, it seems to only occur when a function and its inputs have a type annotation e.g.
test(x::Int)::Int = x + 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants