« Return to Thread: Objects not visible in mixed Eclipse Project

Re: Objects not visible in mixed Eclipse Project

by Iulian Dragos-2 :: Rate this Message:

Reply to Author | View in Thread

Miles Sabin wrote:
> On Mon, Aug 4, 2008 at 11:02 PM, Bastian, Mark <mbastia@...> wrote:
>>
>> Can anyone else verify that this problem is or is not happening for them?  I
>> am using the nightly build of the scala plugin.
>
> Yes, I can confirm this behaviour. I haven't had the time to get to
> the bottom of it yet, but my hunch is that scalac is marking
> ObjectName$.MODULE$ as a synthetic field and the JDT is refusing to
> let Java code reference it.

MODULE$ is not marked as synthetic (at least not by scalac in the trunk,
which is the same since we're talking about the plugin). There must be
something else. As long as there's no companion class, scalac should
emit a 'mirror class' which has static forwarders to the MODULE$
instance, with the same name as the object. That doesn't work either?

Iulian

 « Return to Thread: Objects not visible in mixed Eclipse Project