Roland Kuhn
Typesafe – The software stack for applications that scale.
twitter: @rolandkuhn
Hi folks,I’m not sure whose bug this is, but as I’m only seeing it in Eclipse I’ll start here. Bottom line: I cannot define a varargs method from Scala so that it is really usable from Java within Eclipse. Works fine with cmdline javac, though.
Hi Iulian,oh, that’s nice (I can confirm that this makes it work on the command line). Which Eclipse preferences setting does this correspond to? Java -> Compiler -> “Compiler compliance level” is set to 1.6.
On Wed, Jun 27, 2012 at 3:38 PM, Roland Kuhn <goo...@rkuhn.info> wrote:Hi Iulian,oh, that’s nice (I can confirm that this makes it work on the command line). Which Eclipse preferences setting does this correspond to? Java -> Compiler -> “Compiler compliance level” is set to 1.6.That sounds right. I assume you see a different error message, right?
27 jun 2012 kl. 15:48 skrev iulian dragos:On Wed, Jun 27, 2012 at 3:38 PM, Roland Kuhn <goo...@rkuhn.info> wrote:
Hi Iulian,oh, that’s nice (I can confirm that this makes it work on the command line). Which Eclipse preferences setting does this correspond to? Java -> Compiler -> “Compiler compliance level” is set to 1.6.That sounds right. I assume you see a different error message, right?Between command line and Eclipse? Yes, that is indeed the case: they differ in which signature they ask for.Eclipse: The method f(Seq<Object>) in the type Varargs is not applicable for the arguments (String,int)cmdline: The method f(Object[]) in the type A is not applicable for the arguments (String, int)So, what is the conclusion?
On Wed, Jun 27, 2012 at 3:59 PM, Roland Kuhn <goo...@rkuhn.info> wrote:27 jun 2012 kl. 15:48 skrev iulian dragos:On Wed, Jun 27, 2012 at 3:38 PM, Roland Kuhn <goo...@rkuhn.info> wrote:
Hi Iulian,oh, that’s nice (I can confirm that this makes it work on the command line). Which Eclipse preferences setting does this correspond to? Java -> Compiler -> “Compiler compliance level” is set to 1.6.That sounds right. I assume you see a different error message, right?Between command line and Eclipse? Yes, that is indeed the case: they differ in which signature they ask for.Eclipse: The method f(Seq<Object>) in the type Varargs is not applicable for the arguments (String,int)cmdline: The method f(Object[]) in the type A is not applicable for the arguments (String, int)So, what is the conclusion?Please file a ticket. It looks like the presentation compiler does not create the Java compatible forwarders for @varargs methods. I didn't even know about this annotation :)
iulianPS. It would probably work fine if the Scala code is in binary form (different project, or a jar on the classpath of the Java project)
This still seems to be an issue. Any progress in the last 3.5 years?
--
You received this message because you are subscribed to the Google Groups "Scala IDE User" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-ide-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/scala-ide-user/334b5bf9-1e15-450b-a324-cec7e9c449ea%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
This still seems to be an issue. Any progress in the last 3.5 years?