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?