Open vasslitvinov opened 4 years ago
@vasslitvinov -- I played a bit with the associated future in test/classes/nilability/bang-array.chpl
as part of #15149.
I think the issue here is actually #7936 and may not have anything to do with postfix-! ? For example the following doesn't compile and fail with the same error:
record C {
var x = 10;
proc getX() {
return x;
}
}
var cs: [1..1] C;
bar(cs.getX());
proc bar(arrayArg: [] int) {
writeln(arrayArg);
}
@mppf's comment here seems like the root cause of the problem.
Do you think there's something else that is going wrong with !
?
@e-kayrakli your analysis makes sense to me.
Currently this code:
does not work because
targetLocales!
is a promoted expression and is not accepted for a formal of an array type.We want to allow that, analogously to this case that works today:
Test: