This is the mail archive of the kawa@sources.redhat.com mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: using (this) in object: wrong result of compilation


Vladimir Tsichevski wrote:

Hi,

this compiles to wrong code:

(object () ((bugMethod v) (let ((n v) (r (this))) (display n))))

Result is

public class bug$object
{
   public Object bugMethod(Object v) {
   Object object = v;
   Object n = this;
   return Scheme.displayFormat.apply1(n);
   }
}

as seen in this listing, the (this) value is passed to (display) instead of the value of v

Regards,

Vladimir

Workaround: changing let to let* results in correct code


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]