izumi icon indicating copy to clipboard operation
izumi copied to clipboard

Factories should produce better error messages for semi-compatible arguments

Open pshirshov opened this issue 3 years ago • 0 comments

 trait Super
 trait Sub extends Super

 case class Output(s: Super)

  trait Factory {
    def make(arg: Sub): Output
  }

arg will not be captured by the macro and the error message isn't easy to read/interpret. We should improve the error message and, possibly, allow non-ambiguous subtypes in such cases.

pshirshov avatar Feb 11 '22 16:02 pshirshov