Groups
Sign in
Groups
Haxe
Conversations
Labels
About
Send feedback
Help
how does the haxe3 new map works?
33 views
error
haxe3
Skip to first unread message
davy zhang
unread,
Feb 19, 2014, 6:59:39 AM
2/19/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to haxe...@googlegroups.com
I copied the code from the mannual it doesn't compile.
simple as
var
map =
new
Map
(
)
;
it gives me a compile error:
Type parameters of multi type abstracts must be known (for IMap<Unknown<0>, Unknown<1>>)
which map should I use?
I am using haxe3.0.1
Luca
unread,
Feb 19, 2014, 8:16:44 AM
2/19/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to haxe...@googlegroups.com
var map = new Map<String, Int>();
will compile
var map:Map<String, Int> = new Map();
will compile
var map = new Map();
map["hiya"] = 10;
will also compile.
The problem with trying to compile 'JUST' 'var map = new Map();' is the compiler doesn't have enough information to infer the type parameters.
Reply all
Reply to author
Forward
0 new messages