Why cannot do var x,y,z = 0 in Intellij worksheet?

46 views
Skip to first unread message

Sebastian M Cheung

unread,
Jul 23, 2015, 1:36:17 PM7/23/15
to scala-language
This is ok in .scala file:

var x, y, z = 0

but not in WorkSheet?

Error:(1, 6) constructor cannot be instantiated to expected type;
 found   : (T1, T2)
 required: Int
var (x,y) = { 0;};}
    ^

Also enabling ShowLine Numbers in WorkSheet only temporarily makes line numbers appear. As soon
as clicking anywhere in WorkSheet area line numbers disappear again?

Simon Schäfer

unread,
Jul 23, 2015, 2:09:31 PM7/23/15
to scala-l...@googlegroups.com
You may not believe it, but your IDE is also just software which has bugs. I would just report it on the IntelliJ ticket tracker, not sure if they follow this mailing list.
--
You received this message because you are subscribed to the Google Groups "scala-language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-languag...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Naftoli Gugenheim

unread,
Jul 23, 2015, 4:17:25 PM7/23/15
to scala-language


On Thu, Jul 23, 2015, 1:36 PM Sebastian M Cheung <minsc...@googlemail.com> wrote:

This is ok in .scala file:

var x, y, z = 0

but not in WorkSheet?

Error:(1, 6) constructor cannot be instantiated to expected type;

 found   : (T1, T2)

 required: Int

var (x,y) = { 0;};}

That isn't the way you typed it is it?

    ^

Also enabling ShowLine Numbers in WorkSheet only temporarily makes line numbers appear. As soon

as clicking anywhere in WorkSheet area line numbers disappear again?

--

Reply all
Reply to author
Forward
0 new messages