[haXe] Unclear error message for extern class constructors
Asger Ottar Alstrup
asger at area9.dk
Mon Jan 29 12:55:14 CET 2007
Hi,
Trying to compile
package org.aswing;
extern class DefaultListCellFactory {
public function new(shareCells: Bool) : DefaultListCellFactory;
public function createNewCell(): Dynamic;
public function isAllCellHasSameHeight(): Bool;
public function isShareCells(): Bool;
public function getCellHeight(): Float;
}
with haxe 1.11 gives
..\..\..\bohr\source\client/org/aswing/DefaultListCellFactory.hx:4:
characters 8-63 : A class constructor can't have a return value
If I remove the return value, I get
Running process: C:\Program Files\Motion-Twin\haxe\haxe.exe conceive.hxml
..\..\..\bohr\source\client/org/aswing/DefaultListCellFactory.hx:4:
characters 8-68 : Type required for extern classes and interfaces
It took some time for me to realize that I need to change the return type to
Void, and now it works:
public function new(shareCells: Bool) : Void;
May I propose to change the second error message to "Extern class
constructors must have Void as return value" or something like that?
Regards,
Asger
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.motion-twin.com/pipermail/haxe/attachments/20070129/d904975e/attachment.htm
More information about the Haxe
mailing list