import std.io;
public proc void main(string args[]) {
chan<int> p[];
p = new chan<int>[200];
}
generates:
public synchronized void run() {
_ld1$p = (PJOne2OneChannel<Integer>[])new Object[200];
for(int i=0; i < 200; i++) {
_ld1$p[i] = new PJOne2OneChannel<Integer>();
};
terminate();
}
and does this when it runs:
Air:ProcessJ matt$ ./pj test4
Exception in thread "Thread-0" java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to [LProcessJ.runtime.PJOne2OneChannel;
at test4$procMain.run(test4.java:15)
at ProcessJ.runtime.Scheduler.run(Scheduler.java:42)
so I guess that answers my question ;-) There is a problem with generic arrays …..
generates:
and does this when it runs:
so I guess that answers my question ;-) There is a problem with generic arrays …..
I think this works: ref: https://www.safaribooksonline.com/library/view/learning-java-4th/9781449372477/ch08s10.html
matt