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 instance variable numbers for line numbers instead of counter. Refs #132 by maartinss · Pull Request #271 · liquid-java/liquidjava

Conversation

@maartinss

@maartinss maartinss commented Jul 9, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Description

Changed variable name convention for TypeChecker:checkVariableRefinements, instead of using global counter, now we're using variable lines. If there's more than one variable with the same name on the same line we use a counter to identify each variable, to use the same variable name for different methods and for better tracking on files we also include the method name.

Closes: #132

image

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@maartinss
changed variable name convention for TypeChecker:checkVariableRefinem…
e311bd5
…ents, instead of using global counter, now we're using variable lines. If there's more than one variable with the same name on the same line we use a counter to identify each variable, to use the same variable name for different methods and for better tracking on files we also include the method name
@rcosta358
rcosta358 force-pushed the main branch from 215f1d4 to d91f256 Compare July 27, 2026 13:30
@alcides
alcides requested a review from CatarinaGamboa August 16, 2026 21:21
@CatarinaGamboa

CatarinaGamboa commented Sep 30, 2026

Copy link
Copy Markdown
Collaborator

Hi @maartinss, sorry for the delay in answering - the summer was a bit hectic. First, thanks for the contribution!

What was your thought process for adding the method in {method}_{var}? This might become too verbose, and do we really need it?

Can we add a test for x = 1; x = 2; to see what happens and whats the verification result?

Nit: to want to target an issue we usually use Closes #132

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@maartinss

maartinss commented Sep 30, 2026

Copy link
Copy Markdown
Author

Hi, I added the method because when I tried only using the variable name and its line the following tests failed:

/liquidjava-example/src/main/java/testSuite/classes/iterator_interface_correct/Test.java:13
/liquidjava-example/src/main/java/testSuite/CorrectFunctionCallSameVariableName.java:26
/liquidjava-example/src/main/java/testSuite/classes/arraylist_correct/SimpleTest.java:19

But I understand that it can be too verbose, so I will try a different approach and add the test requested.
Thank you.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@CatarinaGamboa CatarinaGamboa mentioned this pull request Nov 5, 2026
Variable superscripts match nothing in the code and render as separate digits #492
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@CatarinaGamboa CatarinaGamboa Awaiting requested review from CatarinaGamboa

At least 1 approving review is required to merge this pull request.

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Change instance variable numbers for line numbers instead of counter

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@maartinss @CatarinaGamboa
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.
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.