magnolia icon indicating copy to clipboard operation
magnolia copied to clipboard

Support @implicitNotFound errors

Open joroKr21 opened this issue 5 years ago • 3 comments

Magnolia has pretty good missing implicit errors. However custom @implicitNotFound messages defined by users are swallowed. This came up on Gitter.

joroKr21 avatar Apr 21 '20 15:04 joroKr21

Are you thinking that we could read the appropriate @implicitNotFound annotation and use its text in Magnolia's output?

propensive avatar Apr 23 '20 22:04 propensive

It should be simpler than that - use inferImplicitValue with silent = false and catch the error. I'm not sure if this would slow us down though.

joroKr21 avatar Apr 23 '20 22:04 joroKr21

Although it probably wouldn't be too hard to read the annotation from the type only when we need to produce an error.

joroKr21 avatar Apr 24 '20 09:04 joroKr21