AssertionError: invalid `cache_argtypes` for `mi` on Julia nightly
(Initially reported in JuliaPolyhedra/Polyhedra.jl#370)
```julia
using Polyhedra, CDDLib
Base.infer_return_type(points, Tuple{CDDGeneratorMatrix})
```
On `1.14.0-DEV.2257`:
```
ERROR: AssertionError: invalid `cache_argtypes` for `mi`
Stacktrace:
[1] constprop_cache_lookup(𝕃::Compiler.InferenceLattice{…}, mi::Core.MethodInstance, given_argtypes::Vector{…}, cache::Compiler.InferenceCache)
@ Compiler ./../usr/share/julia/Compiler/src/inferenceresult.jl:223
[2] const_prop_call(interp::Compiler.NativeInterpreter, mi::Core.MethodInstance, result::Compiler.MethodCallResult, arginfo::Compiler.ArgInfo, sv::Compiler.InferenceState{…}, concrete_eval_result::Nothing)
@ Compiler ./../usr/share/julia/Compiler/src/abstractinterpretation.jl:1424
[3] abstract_call_method_with_const_args(interp::Compiler.NativeInterpreter, result::Compiler.MethodCallResult, f::Any, arginfo::Compiler.ArgInfo, si::Compiler.StmtInfo, match::Core.MethodMatch, sv::Compiler.InferenceState{…}, invokecall::Nothing)
@ Compiler ./../usr/share/julia/Compiler/src/abstractinterpretation.jl:951
[4] widenwrappedconditional(typ::Any)
@ Compiler ./../usr/share/julia/Compiler/src/abstractinterpretation.jl:919 [inlined]
[5] (::Compiler.var"#handle1#abstract_call_gf_by_type##1"{…})(interp::Compiler.NativeInterpreter, sv::Compiler.InferenceState{…})
@ Compiler ./../usr/share/julia/Compiler/src/abstractinterpretation.jl:189
[6] (::Compiler.var"#infercalls#abstract_call_gf_by_type##0"{…})(interp::Compiler.NativeInterpreter, sv::Compiler.InferenceState{…})
@ Compiler ./../usr/share/julia/Compiler/src/abstractinterpretation.jl:259
[7] abstract_call_gf_by_type(interp::Compiler.NativeInterpreter, func::Any, arginfo::Compiler.ArgInfo, si::Compiler.StmtInfo, atype::Any, vtypes::Vector{…}, sv::Compiler.InferenceState{…}, max_methods::Int64)
@ Compiler ./../usr/share/julia/Compiler/src/abstractinterpretation.jl:339
[8] abstract_call_known(interp::Compiler.NativeInterpreter, f::Any, arginfo::Compiler.ArgInfo, si::Compiler.StmtInfo, vtypes::Vector{…}, sv::Compiler.InferenceState{…}, max_methods::Int64)
@ Compiler ./../usr/share/julia/Compiler/src/abstractinterpretation.jl:2999
[9] abstract_call(interp::Compiler.NativeInterpreter, arginfo::Compiler.ArgInfo, si::Compiler.StmtInfo, vtypes::Vector{…}, sv::Compiler.InferenceState{…}, max_methods::Int64)
@ Compiler ./../usr/share/julia/Compiler/src/abstractinterpretation.jl:3107
[10] (::Compiler.var"#infercalls#abstract_apply##0"{…})(interp::Compiler.NativeInterpreter, sv::Compiler.InferenceState{…})
@ Compiler ./../usr/share/julia/Compiler/src/abstractinterpretation.jl:2028
[11] abstract_apply(interp::Compiler.NativeInterpreter, argtypes::Vector{…}, si::Compiler.StmtInfo, vtypes::Vector{…}, sv::Compiler.InferenceState{…}, max_methods::Int64)
@ Compiler ./../usr/share/julia/Compiler/src/abstractinterpretation.jl:2048
[12] abstract_call_known(interp::Compiler.NativeInterpreter, f::Any, arginfo::Compiler.ArgInfo, si::Compiler.StmtInfo, vtypes::Vector{…}, sv::Compiler.InferenceState{…}, max_methods::Int64)
@ Compiler ./../usr/share/julia/Compiler/src/abstractinterpretation.jl:2851
[13] abstract_call(interp::Compiler.NativeInterpreter, arginfo::Compiler.ArgInfo, si::Compiler.StmtInfo, vtypes::Vector{…}, sv::Compiler.InferenceState{…}, max_methods::Int64)
@ Compiler ./../usr/share/julia/Compiler/src/abstractinterpretation.jl:3107
[14] call_result_unused(sv::Compiler.InferenceState{Compiler.NativeInterpreter}, currpc::Int64)
@ Compiler ./../usr/share/julia/Compiler/src/abstractinterpretation.jl:3100 [inlined]
[15] abstract_call(interp::Compiler.NativeInterpreter, arginfo::Compiler.ArgInfo, sstate::Compiler.StatementState, sv::Compiler.InferenceState{…})
@ Compiler ./../usr/share/julia/Compiler/src/abstractinterpretation.jl:3251
[16] abstract_eval_call(interp::Compiler.NativeInterpreter, e::Expr, sstate::Compiler.StatementState, sv::Compiler.InferenceState{…})
@ Compiler ./../usr/share/julia/Compiler/src/abstractinterpretation.jl:3269 [inlined]
[17] abstract_eval_statement_expr(interp::Compiler.NativeInterpreter, e::Expr, sstate::Compiler.StatementState, sv::Compiler.InferenceState{…})
@ Compiler ./../usr/share/julia/Compiler/src/abstractinterpretation.jl:3639
[18] checkbounds(A::Vector{Compiler.BasicBlock}, I::Int64)
@ Base ./../usr/share/julia/Compiler/src/abstractinterpretation.jl:4046 [inlined]
[19] getindex(A::Vector{Compiler.BasicBlock}, i::Int64)
@ Base ./../usr/share/julia/Compiler/src/abstractinterpretation.jl:4003 [inlined]
[20] typeinf_local(interp::Compiler.NativeInterpreter, frame::Compiler.InferenceState{…}, nextresult::Compiler.CurrentState)
@ Compiler ./../usr/share/julia/Compiler/src/abstractinterpretation.jl:4587
[21] typeinf(interp::Compiler.NativeInterpreter, frame::Compiler.InferenceState{Compiler.NativeInterpreter})
@ Compiler ./../usr/share/julia/Compiler/src/abstractinterpretation.jl:4865
[22] typeinf_ext(interp::Compiler.NativeInterpreter, mi::Core.MethodInstance, source_mode::UInt8)
@ Compiler ./../usr/share/julia/Compiler/src/typeinfer.jl:1537
[23] specialize_method(match::Core.MethodMatch)
@ Base ./../usr/share/julia/Compiler/src/typeinfer.jl:1559 [inlined]
[24] typeinf_type(interp::Compiler.NativeInterpreter, match::Core.MethodMatch)
@ Compiler ./../usr/share/julia/Compiler/src/typeinfer.jl:1556
[25] invoke_in_typeinf_world(::Function, ::Vararg{Any})
@ Base ./reflection.jl:317
[26] invoke_default_compiler(::Symbol, ::Compiler.NativeInterpreter, ::Vararg{Any})
@ Base ./reflection.jl:322
[27] invoke_interp_compiler(::Nothing, ::Symbol, ::Compiler.NativeInterpreter, ::Vararg{Any})
@ Base ./reflection.jl:330
[28] infer_return_type(f::Any, types::Any; world::UInt64, interp::Nothing)
@ Base ./reflection.jl:687
[29] infer_return_type(f::Any, types::Any)
@ Base ./reflection.jl:671
[30] top-level scope
@ REPL[2]:1
Some type information was truncated. Use `show(err)` to see complete types.
```
On `1.12.6`, it works without error:
```
Polyhedra.SingleRepIterator{T, _A, _B} where {T<:Union{Float64, Rational{BigInt}}, _A, _B<:Rep{T}}
```
---
```
julia> versioninfo()
Julia Version 1.14.0-DEV.2257
Build Info:
Official https://julialang.org release
Commit 6765a540614 (2026-05-30 03:46 UTC)
GC: Built with stock GC
Platform Info:
OS: macOS (arm64-apple-darwin24.6.0)
CPU: 14 × Apple M4 Pro (apple-m4)
WORD_SIZE: 64
LLVM: libLLVM-21.1.8 (ORCJIT, apple-m4)
Threads: 1 default, 1 interactive, 1 GC (on 10 virtual cores)
```
关闭于 2026-06-03 0 条评论