I believe your analysis is correct, we need to flesh out the interface spec
that is generated for a mixin. This should be straight-forward I would think.
Probably just a variation in the swf9 unparser. Can you file this as a bug?
If you want to take a crack at it, that would be great; if not, assign to me
and I'll have a look.
On 2010-09-28, at 19:48, Henry Minsky wrote:
> 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?