Closed
Description
What's the rationale for deprecating @compileTimeOnly
in #6416?
First, doing that would introduce unnecessary migration pain, for little gain (I assume it's quite straightforward to support in the compiler). Second, the proposed alternative doesn't cover all use cases of @compileTimeOnly
well. For example, can you encode the following with just inline
and error
?
scala> trait A { @scala.annotation.compileTimeOnly("oops") def f: Int }
defined trait A
scala> class B extends A { def f = 0 }
defined class B
scala> (new B).f
res0: Int = 0
scala> (new B : A).f
<console>:14: error: oops
(new B : A).f
^
Metadata
Metadata
Assignees
Labels
No labels