Is it possible to use annotations on types with Scala 2.12?
I mean in Java 8 this become possible:
List<@NonNull String> list = new ArrayList<@NonNull String>();
Is it possible with Scala too? I tried the following, but it did not work:
val ls: Seq[@NonNull String] = List.empty[@NonNull String]
Error:(8, 15) identifier expected but β@β found.
Is the syntax different?
I was searching in the release notes of 2.12, but could not find mentioning it. Are there plans to support this (and probably also module annotations in Java 9)?