Attempt to preserve/sanitize positions
milessabin opened this issue · comments
Currently the @bundle
macro annotation will discard positions on resulting trees if -Yrangepos
is enabled to avoid RangePosition
validation errors. For improved IDE friendliness it might be useful to attempt to backport this logic from 2.11.x both for macro-compat's own macro, and also to wrap all user macro method calls to do the same.
As of c066786 positions will be stripped from user macro result trees if -Yrangepos
is enabled. This should prevent compiler crashes due to position validation errors, however it would be preferable to fix the positions as above.
See also this recent scalac commit.