Maynard has a mixin  which wants to declare that some methods return
objects of the type of that mixin. I distilled that down
to this test case

<canvas width="100%" height="80%" >

  <mixin name="TreeNodeMixin">
    <method name="methodA" returns="lz.TreeNodeMixin">
     return this;
   </method>

   <method name="methodB" returns="lz.TreeNodeMixin">
     return this;
   </method>

   <method name="methodC" returns="lz.TreeNodeMixin">
     return this.methodA().methodB();
   </method>

  </mixin>

  <class name="foo" with="TreeNodeMixin" />

</canvas>


Compiling this in swf10 gives

org.openlaszlo.sc.CompilerError: test/main.lzx: 13: Error: Call to a
possibly undefined method methodB through a reference with static type
$lzc$class_TreeNodeMixin, in line: return this.methodA().methodB()
Macintosh-2:trunk-clean hqm$

because when it goes to look at the declaration of $lzc$class_TreeNodeMixin,
all we wrote out is

package {
interface $lzc$class_TreeNodeMixin {
}
}

At one point we talked about adding in the method declarations to this , I
guess this is an example of where
we need to?

Reply via email to