On Sat, Oct 3, 2020 at 12:09 AM Brian Goetz <brian.go...@oracle.com> wrote: > > I think we're reaching diminishing returns here.
Well, to me, it's not diminishing. It's certainly a piece of code that will not have any effect after compilation, so it's a mistake. Reporting it is not that hard. Having a class/runtime annotation in source code that disappears completely in the compiled class-file without any warning sounds confusing and may cause subtle problems. Well, of course, we can create an inspection in IntelliJ IDEA to warn about these cases, and people will like IntelliJ IDEA even more, but I believe it's a compiler job to reject this, like Java already does with e.g. unreachable code. With best regards, Tagir Valeev.