Repository navigation
#1687: match the self-call homed into the package in unoptimizable-recursion - #1688
Merged
yegor256 merged 1 commit intoNov 10, 2026
Merged
Conversation
…timizable-recursion In a program with a +package meta, eo-parser puts the top-level object into its package, so its plain-name self-call reads Φ.<package>.<name> instead of Φ.<name>, and the lint reported nothing. The self-call functions now accept both spellings.
Contributor
Author
|
@yegor256 CI is green and the branch is up to date with |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
unoptimizable-recursionrecognised the plain-name self-call of a top-level object only asΦ.<name>. In a program with a+packagemeta, eo-parser 0.63.0 puts the top-level object into its package, socalc (n.minus 1)inside[n] > calcof+package foobecomesbase="Φ.foo.calc". No self-call matched, and the lint reported nothing for such a program, although the compiler does not turnΦ.foo.calcinto a loop either.The sheet now reads the package from the
+packagemeta, and a neweo:plainfunction gives both spellings of a plain name,Φ.<name>andΦ.<package>.<name>.eo:is-self-call,eo:is-self-dispatchandeo:is-self-directuse it where they compared withconcat('Φ.', $name), so the three shapes of the plain-name self-call are reported in a packaged program as they are in a program without a package.New packs in
packs/single/unoptimizable-recursion/, all with+package foo:catches-plain-name-tail-call-in-a-package.yaml: the example from the issue, which reported no defect before and now gets the "names the formation directly" warning on line 7;catches-plain-name-self-call-in-a-package.yaml: a self-call undern.mul, reported as "no self-call sits in a tail position";catches-a-dispatch-on-the-plain-name-self-call-in-a-package.yaml:calc.plus 1, reported as "the self-call is the receiver of a dispatch";allows-tail-call-in-an-if-branch-in-a-package.yaml: a nested^.rectail call, which still gets no defect.The first three fail on
masterand pass with this change.mvn test -Dtest='LtByXslTest#checksAllLints'passes.Closes #1687.