izumi
izumi copied to clipboard
Factories should produce better error messages for semi-compatible arguments
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.