27 ms·
Trait methods are only visible when the trait is in scope. So a conflict would only appear when both traits are imported and the method is called, in which case
by phaylon 11y ago
Trait methods are only visible when the trait is in scope. So a conflict would only appear when both traits are imported and the method is called, in which case you'll have to disambiguate.
- nathan_long 11y agoCool, thanks for explaining. :) Would it be a compile-time or runtime error?
- phaylon 11y agoIt would be a compile-time error saying (in essence) "multiple applicable methods in scope" and giving you a list of the available methods.
- nathan_long 11y agoAwesome!