yet another wrong compilation
Vladimir Tsichevski
wowa@jet.msk.su
Fri Mar 21 11:51:00 GMT 2003
Hi,
kawa compiles the following function from bug.scm scheme file:
===============================================
(define (my-func self path)
(object
()
((getChildren)
(my-func (this) path)
)
((getChildAt)
(getChildren))
))
===============================================
to three classes: `bug', `bug$frame' and `bug$object'
This is how the `bug$frame' class looks like:
===============================================
public class bug$frame extends ModuleBody
{
Object path;
}
===============================================
and this is the `bug$object':
===============================================
public class bug$object
{
bug$frame this$0;
public bug$object getChildren() {
return bug.myFunc(this, this.this$0.path);
}
public bug$object getChildAt() {
return (/*ERROR!!!*/this.this$0.getChildren();
}
public bug$object(bug$frame var_frame) {
((bug$object) this).this$0 = var_frame;
}
}
===============================================
as you may see the getChildren() method was applied to wrong object:
this.this$0 (should be just `this').
Regards,
Vladimir
More information about the Kawa
mailing list