Question on keyword "with"

Hi guys.

First of all, thanks for the wonderful plugin. It is helping me a lot in my work. But in the process, I have noticed that intellij does not recognize types created with the keyword "with". For instance, suppose there are two traits A and B. Then, we can set an argument of a function foo as follows

def foo(arg: A with B)

But in the function, I cannot access the functions of A and B. Also, for a normal function bar

def foo(arg: A)

Calling it as follows draws a red line saying that the type does not match.

val temp: A with B = someFunction

Is this intentional in preventing some bugs? My code compiles using an external compiler in the terminal without any errors or warnings.

Thanks a lot

1 comment
Comment actions Permalink

For me it looks ok:
Screen Shot 2015-07-15 at 16.02.22.png
Anyway it's not intentional. Can you try latest IDEA 15 EAP with 1.6.3 Scala plugin which will be uploaded in the next 20 minutes (or 1.6.2)?

Best regards,
Alexander Podkhalyuzin.


Please sign in to leave a comment.