bug-kawa
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-kawa] [bug #48347] Exception on import of class with public instanc


From: Per Bothner
Subject: [Bug-kawa] [bug #48347] Exception on import of class with public instance fields and without no-args ctor
Date: Wed, 29 Jun 2016 20:58:59 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0

Update of bug #48347 (project kawa):

                  Status:                    None => Invalid                
             Assigned to:                    None => bothner                

    _______________________________________________________

Follow-up Comment #1:

The import form, when used in that variant, requires Example to be a "module
class" or at least Kawa tries to view it as such, which it isn't, for various
reasons, including that it doesn't have a default constructor.

Kawa import is not the same as Java import.  (import Example)
means "import the public names of (fields in) Example into the current
scope".
For static fields there is no problem, but for instance fields it first tries
to construct an instance.

This should be a compile-time error, I admit.

There is no need for the import if Example is in the default package: just use
Example directory.

Otherwise read: http://www.gnu.org/software/kawa/FAQs.html
If Example is in package p, then you could do:
(import (class p Example))

More useful reading:
http://www.gnu.org/software/kawa/Module-classes.html
http://www.gnu.org/software/kawa/Importing.html


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?48347>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]