似乎
@:native('System.Collections.Generic.Dictionary')
extern class Dictionary<T, U>
是有效的,但它似乎不适用于通用类的嵌套类。
我想写在Haxe,我自己的外语课程&#39;桥,像:
struct K {
string x;
}
struct V {
string y;
}
class Foo {
public void foo(Dictionary<K, V> d) {
Dictionary<K,V>.Enumerator e = d.GetEnumerator();
while (e.MoveNext()) {
Debug.Log(e.Current.Key.x);
Debug.Log(e.Current.Value.y);
}
}
}