Skip to content

Commit

Permalink
Add test locking in issue chapel-lang#14813
Browse files Browse the repository at this point in the history
@cassella noticed that this is now passing a few weeks back

---
Signed-off-by: Brad Chamberlain <[email protected]>
  • Loading branch information
bradcray committed Oct 30, 2023
1 parent db99551 commit f9d9806
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/arrays/bugs/arrOfRecordNoDefaultInit.chpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
record Rec
{
var num : int;
proc init( n: int ) { num = n; } // 0-arg init() not defined
}

proc main()
{
var x = new Rec(n = 1); // this works
writeln( "x = ", x, ", type = ", x.type:string );

var r = [ new Rec(n = 1) ]; // this fails
writeln( "r = ", r, ", type = ", r.type:string );
}
2 changes: 2 additions & 0 deletions test/arrays/bugs/arrOfRecordNoDefaultInit.good
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
x = (num = 1), type = Rec
r = (num = 1), type = [domain(1,int(64),one)] Rec

0 comments on commit f9d9806

Please sign in to comment.