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
If I define a module and then try to verify interfaces from outside of the module, it gets confused:
julia>module Foo
using BinaryTraits
using BinaryTraits.Prefix: Is
@trait Cute
@implement Is{Cute} by awesome(_)
struct Wat end@assign Wat with Is{Cute}
end
julia>@check Foo.Wat
✅ Main.Foo.Wat has no interface contract requirements.
The workaround is to run the check inside the module, or expose a method to do that:
julia> module Bar
using BinaryTraits
using BinaryTraits.Prefix: Is
@trait Cute
@implement Is{Cute} by awesome(_)
struct Wat end
@assign Wat with Is{Cute}
testme() = @check Wat
end
julia> Bar.testme()
┌ Warning: Missing implementation
│ contract = BinaryTrait{Main.Bar.Cute}: BinaryTraits.Prefix.Positive{Main.Bar.Cute} ⇢ awesome(🔹)
└ @ BinaryTraits ~/.julia/dev/BinaryTraits/src/interface.jl:62
❌ Main.Bar.Wat is missing these implementations:
1. BinaryTrait{Main.Bar.Cute}: BinaryTraits.Prefix.Positive{Main.Bar.Cute} ⇢ awesome(🔹) (Missing implementation)
The text was updated successfully, but these errors were encountered:
If I define a module and then try to verify interfaces from outside of the module, it gets confused:
The workaround is to run the check inside the module, or expose a method to do that:
The text was updated successfully, but these errors were encountered: