Skip to content

Commit

Permalink
Add future for #26376, compiler hang during resolve (#26377)
Browse files Browse the repository at this point in the history
The added test times out during resolution.

Note: the same program compiles when a distinct array is created instead of
passing a slice:

  var newnums = for i in 0..#nums.size-1 do nums[i+1];
  tryit(newnums);

Contributed by: @cassella - thanks!
Review and merge: @vasslitvinov
  • Loading branch information
vasslitvinov authored Dec 8, 2024
2 parents bdc5e96 + 638e7f8 commit c534099
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
var nums = [ 0, 0, 0 ];

proc tryit(nums) : bool {
if nums.size == 0 then return false;
if tryit(nums[1..].reindex(0..nums.size-2)) then
return true;
return false;
}


tryit(nums);
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bug: compiler hangs in resolve phase
#26376
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
25

0 comments on commit c534099

Please sign in to comment.