Title: False Negative on Recursive Call with Sibling Method with Same Parameter Name · Issue #270 · liquid-java/liquidjava · GitHub
Open Graph Title: False Negative on Recursive Call with Sibling Method with Same Parameter Name · Issue #270 · liquid-java/liquidjava
X Title: False Negative on Recursive Call with Sibling Method with Same Parameter Name · Issue #270 · liquid-java/liquidjava
Description: Description In the following example, when both the fibonacci and factorial methods are present, LiquidJava fails to report an expected verification error on the recursive call inside factorial. Removing the fibonacci method or renaming ...
Open Graph Description: Description In the following example, when both the fibonacci and factorial methods are present, LiquidJava fails to report an expected verification error on the recursive call inside factorial. Re...
X Description: Description In the following example, when both the fibonacci and factorial methods are present, LiquidJava fails to report an expected verification error on the recursive call inside factorial. Re...
Opengraph URL: https://github.com/liquid-java/liquidjava/issues/270
X: @github
Domain: Github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"False Negative on Recursive Call with Sibling Method with Same Parameter Name","articleBody":"**Description**\nIn the following example, when both the `fibonacci` and `factorial` methods are present, LiquidJava fails to report an expected verification error on the recursive call inside `factorial`.\n\nRemoving the `fibonacci` method or renaming one of the `n` parameters causes the expected error to be reported correctly.\n\n**Minimal reproducer**\n```java\nint wrongFibonacci(@Refinement(\"_ \u003e 0\") int n) {\n if (n == 1) return 1;\n else return fibonacci(n - 1) + fibonacci(n - 2); // reports error ✅\n}\n\nint wrongFactorial(@Refinement(\"_ \u003e 0\") int n) { \n return n * factorial(n - 1); // does not report error ❌\n}\n```\n\n**Expected behavior**\nRecursive call of `factorial` should report an error because when `n == 1`, on the next call `n == 0`, which violates the parameter refinement.\n\n**Actual behavior**\nDoes not report the error.\n\n**Environment**\n- LiquidJava version / commit: 0.0.27\n- Java version (`java -version`): 20\n- OS: MacOS 26","author":{"url":"https://github.com/rcosta358","@type":"Person","name":"rcosta358"},"datePublished":"2026-06-26T16:10:14.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/270/liquidjava/issues/270"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:4038a07f-1f3f-b721-5891-7c4f03c3d961 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B3E2:2F79D3:1800D6:21BFC6:6A62EC5A |
| html-safe-nonce | 7be25c1981cc12763f974f8540d7132f2fca9f07495bc10ea0e4b43000bfbb01 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCM0UyOjJGNzlEMzoxODAwRDY6MjFCRkM2OjZBNjJFQzVBIiwidmlzaXRvcl9pZCI6IjIzMDI2MDQ5MjM0ODQ5NTc3ODYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 398a714cd8cab6cda9a3dd95aef46c8ad65a7fb8ca13eac2d252e554a4fa52e7 |
| hovercard-subject-tag | issue:4753420313 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/liquid-java/liquidjava/270/issue_layout |
| twitter:image | https://opengraph.githubassets.com/03426418db45e824748c9e8af3b740477732e926b4a794a0bb1bfbfd9383305f/liquid-java/liquidjava/issues/270 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/03426418db45e824748c9e8af3b740477732e926b4a794a0bb1bfbfd9383305f/liquid-java/liquidjava/issues/270 |
| og:image:alt | Description In the following example, when both the fibonacci and factorial methods are present, LiquidJava fails to report an expected verification error on the recursive call inside factorial. Re... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | rcosta358 |
| hostname | github.com |
| expected-hostname | github.com |
| None | b415018e190e73858133ddcaa36acce7b3f3572fe54dda84bd3b21a6ec714c30 |
| turbo-cache-control | no-preview |
| go-import | github.com/liquid-java/liquidjava git https://github.com/liquid-java/liquidjava.git |
| octolytics-dimension-user_id | 242831829 |
| octolytics-dimension-user_login | liquid-java |
| octolytics-dimension-repository_id | 258218369 |
| octolytics-dimension-repository_nwo | liquid-java/liquidjava |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 258218369 |
| octolytics-dimension-repository_network_root_nwo | liquid-java/liquidjava |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 22f98521e99f504294ab0812b66104d50eb75a70 |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width