Hello everyone, I am writing two libraries (let’s say A and B) which should work together, but ideally either should know about other’s existence. I thought I had worked everything out by making use of multiple-dispatch with
struct fields, but seems it works differently as I expected. The essential example looks as follows:
module TestModule struct Foo bar end testhello(foo::Foo) = hello(foo.bar) end struct Buzz bizz end hello(buzz::Buzz) = println("$(buzz.bizz)") mybuzz = Buzz("Hello") # Test hello hello(mybuzz) # Test testhello TestModule.testhello(mybuzz)
Is it an expected behaviour or a bug?