| Issue 4: | Push an Object in an array, that has a toString method with an argument | |
| 1 person starred this issue and may be notified of changes. | Back to list |
What steps will reproduce the problem?
package;
class Main {
public function new ()
{}
public static function main ():Void
{
var s = new Array<Main>();
s[s.length] = new Main(); //s.push(new Main()); fails also
}
public function toString (val:Float) : String { // if toString doesn't
take an argument everything is fine
return "";
}
}
What is the expected output?
successfull cpp compilation
What do you see instead?
c:\program files\motion-twin\haxe\lib\hxcpp\2,05,1\include\hxString.h(43) :
error C2660: 'Main_obj::to
String' : function does not take 0 arguments
./src/Main.cpp(26) : see reference to function template
instantiation 'String::String<Main_obj
>(const hx::ObjectPtr<OBJ_> &)' being compiled
with
[
OBJ_=Main_obj
]
Called from <null> line 1
Called from BuildTool.hx line 840
Called from BuildTool.hx line 433
Called from BuildTool.hx line 456
Called from BuildTool.hx line 529
Called from BuildTool.hx line 600
Uncaught exception - Error in building thread
Error : Build failed
What version of the product are you using? On what operating system?
Please provide any additional information below.
Jan 12, 2010
#1
aboutwh...@googlemail.com
Jan 12, 2010
sandy3D has many toString functions with arguments
May 6, 2010
Fixed in hxcpp svn
Status:
Fixed
|