Hello all,
I am using the current X10 v2.2 release on OS X 10.6.7 with the C++ backend and
it gives me trouble with the following code:
-------------------------------------------------
import x10.array.DistArray;
public class Test {
public static def main(args: Array[String]) {
val region = 0 .. 79;
val distribution = Dist.makeBlock(region);
val array = DistArray.make(distribution, 0);
printDistArray(array);
}
static def printDistArray(distArray: DistArray) : void
{
Console.OUT.println(distArray);
}
}
-------------------------------------------------
Compiling it produces the following error:
Test.x10:9: No valid method call found for call in given type.
Call: printDistArray(x10.array.DistArray[x10.lang.Int])
Type: Test
Test.x10:12: Type is missing parameters.
Type: x10.array.DistArray
Expected parameters: [T]
2 errors.
Changing the parameter type to 'distArray: DistArray[Int]' produces this
compiler error:
Test.x10:9: Parameter 0 does not have the expected base type.
Formal base type: x10.array.DistArray[x10.lang.Int]
Actual base type: x10.array.DistArray[x10.lang.Int{self==0,
horizontalDist.region.zeroBased==true, horizontalDist.region.rect==true,
horizontalDist.region.rank==1, horizontalDist.region!=null,
x10.array.PlaceGroup.WORLD!=null, region.zeroBased==true, region.min==0,
region.max==79, region!=null}]{self==h_sum, h_sum.dist==horizontalDist,
h_sum!=null, horizontalDist.region.zeroBased==true,
horizontalDist.region.rect==true, horizontalDist.region.rank==1,
horizontalDist.region!=null, x10.array.PlaceGroup.WORLD!=null,
region.zeroBased==true, region.min==0, region.max==79, region!=null}
(method static Test.printDistArray(arg93:
x10.array.DistArray[x10.lang.Int]))
1 error.
And my last try was to use the type Any like this 'distArray: DistArray[Any]'
which also results in an error:
Test.x10:9: No valid method call found for call in given type.
Call: printDistArray(x10.array.DistArray[x10.lang.Int])
Type: Test
1 error.
Can anybody give me a hint on how to achieve this correctly or is this a bug in
X10 somehow?
I would have expected the code to work as it is given in the first place.
Best,
Manfred
------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
X10-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/x10-users