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

TypeError: in typeassert, expected Union{JuliaSyntax.TreeNode{TypedSyntax.TypedSyntaxData}, JuliaSyntax.SyntaxNode}, got a value of type Nothing #584

Open
jishnub opened this issue Jul 31, 2024 · 0 comments
Labels
bug Something isn't working TypedSyntax An issue or pull request relating to the TypedSyntax.jl subpackage

Comments

@jishnub
Copy link
Contributor

jishnub commented Jul 31, 2024

julia> @descend copyto!(rand(2,2), CartesianIndices((2:2, 1:1)), rand(2,2), CartesianIndices((2:2, 1:1)))
[ Info: tracking Base
ERROR: TypeError: in typeassert, expected Union{JuliaSyntax.TreeNode{TypedSyntax.TypedSyntaxData}, JuliaSyntax.SyntaxNode}, got a value of type Nothing
Stacktrace:
  [1] #18
    @ ~/.julia/packages/TypedSyntax/cH1Nu/src/node.jl:598 [inlined]
  [2] filter!(f::TypedSyntax.var"#18#26"{Bool}, a::Vector{Union{JuliaSyntax.TreeNode{…}, JuliaSyntax.SyntaxNode}})
    @ Base ./array.jl:2720
  [3] filter_assignment_targets!
    @ ~/.julia/packages/TypedSyntax/cH1Nu/src/node.jl:597 [inlined]
  [4] map_ssas_to_source(src::Core.CodeInfo, mi::Core.MethodInstance, rootnode::JuliaSyntax.SyntaxNode, Δline::Int64)
    @ TypedSyntax ~/.julia/packages/TypedSyntax/cH1Nu/src/node.jl:624
  [5] tsn_and_mappings(mi::Core.MethodInstance, src::Core.CodeInfo, rt::Any, sourcetext::SubString{…}, lineno::Int64; warn::Bool, strip_macros::Bool, kwargs::@Kwargs{})
    @ TypedSyntax ~/.julia/packages/TypedSyntax/cH1Nu/src/node.jl:54
  [6] tsn_and_mappings(mi::Core.MethodInstance, src::Core.CodeInfo, rt::Any; warn::Bool, strip_macros::Bool, kwargs::@Kwargs{})
    @ TypedSyntax ~/.julia/packages/TypedSyntax/cH1Nu/src/node.jl:39
  [7] tsn_and_mappings
    @ ~/.julia/packages/TypedSyntax/cH1Nu/src/node.jl:32 [inlined]
  [8] #get_typed_sourcetext#24
    @ ~/.julia/packages/Cthulhu/8y2RA/src/reflection.jl:361 [inlined]
  [9] get_typed_sourcetext
    @ ~/.julia/packages/Cthulhu/8y2RA/src/reflection.jl:360 [inlined]
 [10] find_callsites(interp::Cthulhu.CthulhuInterpreter, CI::Core.CodeInfo, stmt_infos::Vector{…}, mi::Core.MethodInstance, slottypes::Vector{…}, optimize::Bool, annotate_source::Bool, pc2excts::Nothing)
    @ Cthulhu ~/.julia/packages/Cthulhu/8y2RA/src/reflection.jl:37
 [11] 
    @ Cthulhu ~/.julia/packages/Cthulhu/8y2RA/src/Cthulhu.jl:496
 [12] _descend(term::REPL.Terminals.TTYTerminal, interp::Cthulhu.CthulhuInterpreter, mi::Core.MethodInstance; kwargs::@Kwargs{})
    @ Cthulhu ~/.julia/packages/Cthulhu/8y2RA/src/Cthulhu.jl:791
 [13] _descend(term::REPL.Terminals.TTYTerminal, args::Any; interp::Core.Compiler.NativeInterpreter, kwargs::@Kwargs{})
    @ Cthulhu ~/.julia/packages/Cthulhu/8y2RA/src/Cthulhu.jl:807
 [14] __descend_with_error_handling(args::Any; terminal::Any, kwargs...)
    @ Cthulhu ~/.julia/packages/Cthulhu/8y2RA/src/Cthulhu.jl:222
 [15] _descend_with_error_handling(f::Any, argtypes::Any; kwargs::@Kwargs{iswarn::Bool})
    @ Cthulhu ~/.julia/packages/Cthulhu/8y2RA/src/Cthulhu.jl:211
 [16] descend_code_typed(::Any, ::Vararg{Any}; kwargs::@Kwargs{})
    @ Cthulhu ~/.julia/packages/Cthulhu/8y2RA/src/Cthulhu.jl:169
 [17] top-level scope
    @ REPL[1]:1
Some type information was truncated. Use `show(err)` to see complete types.

julia> versioninfo()
Julia Version 1.10.4
Commit 48d4fd48430 (2024-06-04 10:41 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 12 × Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-15.0.7 (ORCJIT, skylake)
Threads: 1 default, 0 interactive, 1 GC (on 12 virtual cores)
Environment:
  JULIA_EDITOR = subl

(@v1.10) pkg> st -m Cthulhu
Status `~/.julia/environments/v1.10/Manifest.toml`
  [f68482b8] Cthulhu v2.12.7

(@v1.10) pkg> st -m TypedSyntax
Status `~/.julia/environments/v1.10/Manifest.toml`
  [d265eb64] TypedSyntax v1.3.1
@simeonschaub simeonschaub added TypedSyntax An issue or pull request relating to the TypedSyntax.jl subpackage bug Something isn't working labels Sep 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working TypedSyntax An issue or pull request relating to the TypedSyntax.jl subpackage
Projects
None yet
Development

No branches or pull requests

2 participants