As far as I can see, the behaviour of:
MultiVector (+) MultiVector.new
has changed with this refactor. Before, this would return:
but now it returns:
which then causes a typecheck error on the return value.
Now, I think the value mix() is wrong.
Standard QuantHash semantics should have yielded:
(MultiVector=>1).MultiVector
As can be observed with:
% raku -e 'class A is Mix does Callable { }; dd A (+) A.new'
Real = (A=>1).Mix
Now, I've been able to trace this to the existence of the list method in the MultiVector class. Remove that, and the MultiVector (+) ().MultiVector expression yields the expected result (MultiVector=>1).Mix. However, that is still not the result the tests want, they want 0 returned.
As far as I can tell, this is the only module that is affected by the GQR. And since there are comments in the code such as "the use of C is suspicious here, but it seems to work, so..." it feels like you're doing something that should probably be considered illegal before (but has become illegal now).
I've not been able to pinpoint exactly what is happening there that would cause this regression. Would appreciate another set of eyes on this!
As far as I can see, the behaviour of:
has changed with this refactor. Before, this would return:
().MultiVectorbut now it returns:
which then causes a typecheck error on the return value.
Now, I think the value
mix()is wrong.Standard
QuantHashsemantics should have yielded:As can be observed with:
Now, I've been able to trace this to the existence of the
listmethod in theMultiVectorclass. Remove that, and theMultiVector (+) ().MultiVectorexpression yields the expected result(MultiVector=>1).Mix. However, that is still not the result the tests want, they want0returned.As far as I can tell, this is the only module that is affected by the GQR. And since there are comments in the code such as "the use of C is suspicious here, but it seems to work, so..." it feels like you're doing something that should probably be considered illegal before (but has become illegal now).
I've not been able to pinpoint exactly what is happening there that would cause this regression. Would appreciate another set of eyes on this!