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).