@bradcray Thanks a lot for taking the time to help me out. This is incredibly helpful. I was completely unaware of the business of transfer of ownership carried out by updateFluff()
Indeed it seems like that for the purpose of my program, it is best to replace classes with records. Now, I have tried doing that in the dev branch of my repo. However, I encounter a compilation error which is unhelpful as it doesn't refer to any line in my code that is generating the problem. I again need your help in fixing this. Here's the error that I encounter.
adutt@freya01:1d-simple$ chpl ./main.chpl --fast -o main
$CHPL_HOME/modules/internal/ChapelArray.chpl:1016: In method 'this':
$CHPL_HOME/modules/internal/ChapelArray.chpl:1018: error: Scoped variable cannot be returned
$CHPL_HOME/modules/internal/DefaultRectangular.chpl:1380: In method 'dsiAccess':
$CHPL_HOME/modules/internal/DefaultRectangular.chpl:1382: error: Scoped variable cannot be returned
$CHPL_HOME/modules/internal/ChapelArray.chpl:1016: In method 'this':
$CHPL_HOME/modules/internal/ChapelArray.chpl:1018: error: Scoped variable cannot be returned
$CHPL_HOME/modules/internal/DefaultRectangular.chpl:1380: In method 'dsiAccess':
$CHPL_HOME/modules/internal/DefaultRectangular.chpl:1382: error: Scoped variable cannot be returned
$CHPL_HOME/modules/dists/StencilDist.chpl:1650: In method 'dsiAccess':
$CHPL_HOME/modules/dists/StencilDist.chpl:1652: error: Scoped variable cannot be returned
$CHPL_HOME/modules/dists/StencilDist.chpl:1650: In method 'dsiAccess':
$CHPL_HOME/modules/dists/StencilDist.chpl:1652: error: Scoped variable cannot be returned