annotation on primary constructor blows up intellij

Dear Dev Team,

I am using scala with Guice and when I tried to set an annotation on the primary constructor it blew up intellij completely

here is the ticket:

code example:
class  DefaultControl @Inject() (representation:MyType) {}

could you please take a look?

Thank you

Comment actions Permalink

I upgraded intellij and the scala plugin to 0.2.21944 and my problem went away ! Thank you so much for fixing it!

Comment actions Permalink

You're welcome. Actually, that was a parser issue.

With best regards,

Comment actions Permalink

This fix has problems. So be careful.
According spec Annotation is:
'@' [Constr]
Constr is

class Element @Annot() (x: Int)

According spec [@Annot() (x: Int)] - Annotation. But really only [@Annot()] is Annotation.

So be carefully until new realese. (Because it's produces bugs with parser, completion etc.)

Good luck.


Please sign in to leave a comment.