bug-kawa
[Top][All Lists]
Advanced

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

[Bug-kawa] [bug #47412] Can't use define in the constructor of a subclas


From: Per Bothner
Subject: [Bug-kawa] [bug #47412] Can't use define in the constructor of a subclass
Date: Tue, 15 Mar 2016 01:08:06 +0000
User-agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:44.0) Gecko/20100101 Firefox/44.0

Update of bug #47412 (project kawa):

                  Status:                    None => Confirmed              

    _______________________________________________________

Follow-up Comment #1:

This one is difficult.
There are conflicting "rewrite" operations:

(1) A 'define' in a <block> (i.e. sequence of expressions and statements) is
visible in the whole block, so the code is transformed into a let-form.

(2) Constructors are handled specially.  The code generator when handling a
constructor looks for call to *init* on this or the super class.  However, if
(1) happens, then it doesn't see the invoke-special, so it calls the default
super constructor.  Then when we get to the invoke-special, we get an error
since the object is already constructed.

A fix is for the logic in (2) to be smarter, so it can recognize constructor
calls in a let.

    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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