Compiled programs can't call self.functions from other self.functions
[From Simon Donné] I have the following rough structure in my code:
function [image:cube] = get_image(self:^MyObject)
image = rand(100,100)
endfunction
function [image2:cube] = get_special_image(self:^MyObject)
image2 = self.get_image()+0.5
endfunction
Now, this all works fine only from redshift: yet when I compile a binary and run that one, the call inside get_special_image throws the "Cannot cast from source type to destination type." error.
NB: is it possible to get that error a bit more specific, at least printing out what types are involved? That would have helped a bit tracking down the issue :)