tk3369 / BinaryTraits.jl

Can do or not? It's easy. See https://tk3369.github.io/BinaryTraits.jl/dev/
MIT License
53 stars 3 forks source link

propagate interface contracts to subtypes #34

Closed KlausC closed 4 years ago

KlausC commented 4 years ago

Fixes #30.

If a supertype or unionall A has assigned a trait, then all subtypes or specializations B <: A automatically complies to the trait, if A does, because foo(::A) is called by foo(B()).

To determine the traits(T::Assignable) collect all keys key of traits_map which have k <: T and build the union of all the sets of traits associated with those keys.

codecov-io commented 4 years ago

Codecov Report

Merging #34 into master will not change coverage. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master       #34   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            5         5           
  Lines          190       194    +4     
=========================================
+ Hits           190       194    +4     
Impacted Files Coverage Δ
src/interface.jl 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 0fb1719...8816254. Read the comment docs.

tk3369 commented 4 years ago

I will merge this PR right after #33. Thanks for your contribution.

tk3369 commented 4 years ago

Just merged #33 and this is pending. Can you resolve the conflict? Thanks

KlausC commented 4 years ago

conflicts have been resolved.

tk3369 commented 4 years ago

Thanks!