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
Similar to #1209, #1814 and #801, except the workaround of specifying the return type of the method doesn't work because it's an implicit object, not an implicit method.
caseclassMyClass()
objectBugReport {
implicitly[Ordering[MyClass]] // error: No implicit Ordering defined for MyClass.
}
// if this module is moved above BugReport, the compilation error disappearsobjectMyClass {
implicitobjectMyOrderingextendsOrdering[MyClass] {
defcompare(x: MyClass, y: MyClass) =???
}
}
The text was updated successfully, but these errors were encountered:
Samuel Gélineau (gelisam) said:
This issue relates to #5265, which tackles the problem of order-relevant implicits by displaying a warning whenever an implicit def doesn't specify its return type. This works for implicit defs, however as my example demonstrates, there are other cases in which the order-relevance of implicits leads to hard-to-fix error messages, and the suggested warning wouldn't cover those cases.
Similar to #1209, #1814 and #801, except the workaround of specifying the return type of the method doesn't work because it's an implicit object, not an implicit method.
The text was updated successfully, but these errors were encountered: