| Issue 220: | ‘class Array_obj’ has no member named ‘map’ | |
| 1 person starred this issue and may be notified of changes. | Back to list |
Using haxe r5897, hxcpp r629, the following code produce the attached error: using Lambda; class Main { public static function main():Void { ["1"].map(Std.parseInt); } } ./src/Main.cpp: In static member function ‘static Void Main_obj::main()’: ./src/Main.cpp:32: error: ‘class Array_obj’ has no member named ‘map’ Called from ? line 1 Called from BuildTool.hx line 1448 Called from BuildTool.hx line 667 Called from a C function Called from BuildTool.hx line 702 Called from BuildTool.hx line 836 Called from BuildTool.hx line 883 Called from BuildTool.hx line 244 Uncaught exception - Error : 1 - build cancelled Error : Build failed
Jan 18, 2013
#1
andy@onthewings.net
Jan 27, 2013
Before hxcpp implements the two method, one can workaround by wrapping the map/filter methods in Array.hx like: #if !cpp function map<S>( f : T -> S ) : Array<S>; function filter( f : T -> Bool ) : Array<T>; #end
Jan 30, 2013
Filter is easy, but how to handle the type parameter of S?
Status:
Accepted
Owner: gameh...@gmail.com Labels: -Priority-Medium Priority-High
Feb 1, 2013
Fixed
Status:
Fixed
|