tek / splain

better implicit errors for scala
MIT License
370 stars 28 forks source link

Splain doesn't respect -Ymacro-annotations compiler flag #30

Closed 4e6 closed 4 years ago

4e6 commented 4 years ago

When trying to build the project that uses macro annotations, compilation fails with:

[error] splain-macro-annotations/Test.scala:7:23: macro annotation could not be expanded (you cannot use a macro annotation in the same compilation run that defines it)
[error]   @newtype case class Foo(ix: Int)
[error]                       ^
[error] one error found

The error message is the same as if you forget to add -Ymacro-annotations compiler flag.

Example project, that reproduces the issue: 4e6/splain-macro-annotations

scalaVersion: 2.13.1 splainVersion: 0.5.0