GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Change `return` to `$result` for method return values in refinements · Issue #133 · liquid-java/liquidjava

Change return to $result for method return values in refinements #133

New issue
Copy link
New issue
Copy link
Open
#145
Open
Change return to $result for method return values in refinements#133
#145
Copy link
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers

Description

@CatarinaGamboa
CatarinaGamboa
opened on Dec 10, 2025
Issue body actions

return is a statement, and it's strange to have it as a variable to represent the return value.
Therefore, we could change it for result. But since result can be an actual variable that represents something other than the return value we, we can try using $result.

This would mean a small change in the grammar, probably, and a change in replacing the return value.
Ps: the _ should still work in any case

Example Before:

@Refinement("return > 0") 
int test2 (){
    return 10;
}

Example After:

@Refinement("$result > 0") 
int test2 (){
    return 10;
}

Activity

  1. CatarinaGamboa
    added
    good first issueGood for newcomersGood for newcomers
    enhancementNew feature or requestNew feature or request
    on Dec 10, 2025
  2. alcides commented on Dec 10, 2025

    @alcides
    alcides
    on Dec 10, 2025
    Collaborator
    More actions

    I support this change. I never liked return in the refinement for that reason.

  3. rajshivu commented on Feb 9, 2026

    @rajshivu
    rajshivu
    on Feb 9, 2026
    More actions

    Hi 👋 I’d like to work on this issue and implement the $result replacement as suggested.
    I’ll make sure _ continues to work as well.
    Please let me know if there’s anything specific you’d like me to watch out for.

  4. rajshivu commented on Feb 9, 2026

    @rajshivu
    rajshivu
    on Feb 9, 2026
    More actions

    Hi,
    I’ve implemented a fix for the refinement variable mapping issue ('_' and 'return' → $result). I’ve tested it manually, and the branch is ready.
    I’ve created a Pull Request here: #145
    Please take a look when you get a chance. Let me know if any further changes are needed.

  5. rcosta358
    linked a pull request that will close this issueAdd `#result` for Return Refinements #145on Feb 15, 2026
  6. alcides commented on Oct 15, 2026

    @alcides
    alcides
    on Oct 15, 2026
    Collaborator
    More actions

    Does this still make sense @CatarinaGamboa?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.