Interfaces and "package"

35 views
Skip to first unread message

Eric Herz

unread,
May 1, 2015, 3:00:54 AM5/1/15
to mi...@googlegroups.com
Hi all-

I've just recently started using Mirah for a project and it's great. I've noticed that while the documentation on the site notes that package path is derived from the file system path, I've noticed in the current version I'm using (v0.1.4), it not only allows me to declare package but it seems to require it. I've declared the package on most of my files, but I've run into a snag with interfaces. I have an interface defined in its own file, like so:

package my.package.path

interface Foo do

  def bar(x: int): void; end

end

The interface seems to compile file, and even imports fine in another file:

import my.package.path.Foo

However, I get a runtime error:

java/lang/ClassLoader.java:-2:in `defineClass1': java.lang.NoClassDefFoundError:my.package.path.Foo

I suspect that perhaps the package keyword implementation is a newer feature and something has been overlooked with interfaces??

Nick Howard

unread,
May 1, 2015, 2:05:20 PM5/1/15
to mi...@googlegroups.com
That's certainly possible. Could you file a bug on github? It should be pretty easy to reproduce if that's right.

--
You received this message because you are subscribed to the Google Groups "The Mirah Programming Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mirah+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Eric Herz

unread,
May 1, 2015, 3:18:18 PM5/1/15
to mi...@googlegroups.com
Couldn't reproduce it in a test case at first until I realized it might be the file inclusion order. I was right. Issue here:

Reply all
Reply to author
Forward
0 new messages