You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Pharo13 (and at least since Pharo 11), refersToLiteral: can infinitely recurse.
This happens if the method is part of the list of literals (and probably if it is in a literal array it happens too but I have not tested)
refersToLiteral: aLiteral
"Answer true if any literal in this method is literal, even if embedded in array structure."1to:self numLiterals -self literalsToSkip do: [ :index |
"exclude selector or additional method state (penultimate slot) and methodClass or outerCode (last slot)"
((selfliteralAt: index) refersToLiteral: aLiteral)
ifTrue: [ ^true ] ].
^false
The text was updated successfully, but these errors were encountered:
I was wondering if I should add a test. The problem is that when the test fails it would produce an infinite loop and this is a bad idea.
I was wondering how to write a test that does not loop still check the point.
If it loops, the CI should stop it with a timeout...
However, there is a risk that something triggers the loop again outside of the control of the test runner.
But I think it's worth trying.
The test should however be careful to not install the method in the system.
In Pharo13 (and at least since Pharo 11),
refersToLiteral:
can infinitely recurse.This happens if the method is part of the list of literals (and probably if it is in a literal array it happens too but I have not tested)
The text was updated successfully, but these errors were encountered: