Skip to content

Change instance variable numbers for line numbers instead of counter. Refs #132 - #271

Open
maartinss wants to merge 1 commit into
liquid-java:mainfrom
maartinss:change-variable-numbers-for-line-numbers
Open

maartinss wants to merge 1 commit into
liquid-java:mainfrom
maartinss:change-variable-numbers-for-line-numbers

Conversation

@maartinss

@maartinss maartinss commented Jul 9, 2026 •

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

…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
@CatarinaGamboa

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

@maartinss

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.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Change instance variable numbers for line numbers instead of counter

2 participants