18137, "e-kayrakli", "Using array actuals as field default values in nested types doesn't compile", "2021-07-28T23:55:44Z"
proc foo(A: []) {
record Cmp {
var arr = A;
}
return new Cmp();
}
writeln(foo([1,2,3]));
Fails with
internal error: AST-PRI-IVE-0235 chpl version 1.25.0 pre-release (c89e0f3496)
or with --devel
:
internal error: invalid attempt to get reference type [AST/primitive.cpp:235]
This compiles if the argument is an integer.