bug-kawa
[Top][All Lists]
Advanced

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

[Bug-kawa] [bug #15725] anon classes defined by (object ...) not being w


From: Per Bothner
Subject: [Bug-kawa] [bug #15725] anon classes defined by (object ...) not being written
Date: Wed, 15 Feb 2006 01:17:41 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.8.0.1) Gecko/20060130 SeaMonkey/1.0

Update of bug #15725 (project kawa):

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

    _______________________________________________________

Follow-up Comment #3:

The name of the main class should not depend on whether there are other
auxiliary classes.

However, I also think that the name of the main class should be the same
whather we're compiling to class files or to an archive.  This isn't
essential, but I think that seems desirable.

This can be "fixed" by removing this line in Compilation's compileToArchive
method:
    mexp.setName(LambdaExp.fileFunctionName);

Since the name of the main class when compiling to class files depends on the
name of the source file, it follows we can't depend on a fixed name like
"atFileLevel".  So picking the first class in the archive makes sense.

One possible solution is to make sure we call addClass on the main file
before we call it on the other classes.  However, we have to be a little bit
careful.  There might be a module-name declaration in the source file, so at
least naming the main class must wait a little bit.  (However, it is
reasonable to disallow a module-name after we have seen an expression that
creates a class.)

Perhaps you could send me your patch.  I won't necessarily use it, but I'll
think about the options.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?func=detailitem&item_id=15725>

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





reply via email to

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