Details
-
Type:
Bug
-
Status:
In Progress
-
Priority:
Critical
-
Resolution: Unresolved
-
Affects Version/s: X10 2.2
-
Fix Version/s: X10 2.3.2
-
Component/s: X10 Compiler: Front-end
-
Labels:None
-
Testcase included:yes
-
Number of attachments :
Description
The following code is legal and should compile without inserting any dynamic checks:
val a = DistArray.make[Rail[Int]](Dist.makeUnique(), ([i] : Point) => new Array[Int](1));
val b = a.restriction(here);
val x/* :Rail[Int] */ = b(0);
val y = x(1);
However, compiling with -VERBOSE_CHECKS with either X10 2.2 or SVN HEAD emits the following warning for the final line:
x10c -O -VERBOSE_CHECKS TestDistArrayRestriction.x10 /scratch/testx10/TestDistArrayRestriction.x10:17: Generated a dynamic check for the method call.
As indicated, the type of x should be Rail[Int] as it is an element of a DistArray of that type. It appears that the full type of DistArray[T] is not being propagated through to the return type of DistArray[T].restriction(p: Place): DistArray[T](rank).
Issue Links
- is duplicated by
-
XTENLANG-2991
ArrayList[Rail[Int]] doesn't contain Rail[Int]s
-