You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Suppose I define an abstract type with a required method, like this:
""" AbstractFooConcrete subtypes must implement `bar`."""abstract type AbstractFoo end""" bar(foo::AbstractFoo)"""function bar endopenbar(foo::AbstractFoo) =bar(foo)
This is standard practice to document an interface.
Then, when I apply JET error analysis, I get a hit:
using JET
println(report_call(openbar, (AbstractFoo, )))
gives me
═════ 1 possible error found ═════
┌ @ .../jet_interface.jl:16 bar(foo)
│ no matching method found `bar(::AbstractFoo)`: bar(foo::AbstractFoo)
└──────────────────────────────────────────────────
No surprise there, JET is doing its job. So what's the right move if I want to analyse a whole package that contains several such interfaces? Do I just ignore these?
Until JuliaLang/julia#6975 is solved, interfaces won't have a formal definition, and so JET cannot possibly validate the call to openbar(foo).
The text was updated successfully, but these errors were encountered:
Suppose I define an abstract type with a required method, like this:
This is standard practice to document an interface.
Then, when I apply JET error analysis, I get a hit:
gives me
No surprise there, JET is doing its job. So what's the right move if I want to analyse a whole package that contains several such interfaces? Do I just ignore these?
Until JuliaLang/julia#6975 is solved, interfaces won't have a formal definition, and so JET cannot possibly validate the call to
openbar(foo)
.The text was updated successfully, but these errors were encountered: