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 — Fix Field Initialization by rcosta358 · Pull Request #281 · liquid-java/liquidjava

Conversation

@rcosta358

@rcosta358 rcosta358 commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

Description

This PR makes constructors preserve state refinements when an object is assigned directly to a class field.
Field initializers were visited but their refinement metadata was not transferred to the field’s symbolic instance.

Example

public class Test {

    private final Obj obj = new Obj();

    public void test() {
        obj.foo(); // reports state refinement error but should pass
    }
}

@Ghost("boolean ready")
class Obj {

    @StateRefinement(to = "ready(this)")
    Obj() {}

    @StateRefinement(from = "ready(this)")
    void foo() {}
}

Related Issue

None.

Type of change

  • Bug fix
  • New feature
  • Documentation update
  • Code refactoring

Checklist

  • Added/updated tests under liquidjava-example/src/main/java/testSuite/ (Correct* / Error*)
  • mvn test passes locally
  • Updated docs/README if behavior or API changed

Sorry, something went wrong.

Uh oh!

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

All reactions
@rcosta358 rcosta358 self-assigned this Aug 6, 2026
@rcosta358 rcosta358 added the bug Something isn't working label Aug 6, 2026
alcides
alcides approved these changes Aug 11, 2026
View reviewed changes
@rcosta358
rcosta358 force-pushed the fix-npe-3 branch from af93729 to db07738 Compare August 11, 2026 09:29
rcosta358 added 2 commits August 11, 2026 10:35
@rcosta358
Fix Field Initialization
333d176
@rcosta358
Fix Instance Variables
74dfda1
@rcosta358
rcosta358 force-pushed the fix-field-initialization branch from 4ddc546 to 74dfda1 Compare August 11, 2026 09:39
@rcosta358
rcosta358 changed the base branch from fix-npe-3 to main August 11, 2026 09:41
@rcosta358
rcosta358 merged commit 61d3a67 into main Aug 11, 2026
1 check passed

Uh oh!

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

@rcosta358
rcosta358 deleted the fix-field-initialization branch August 21, 2026 14:55
@CatarinaGamboa CatarinaGamboa mentioned this pull request Oct 13, 2026
See state changes through aliases and forget mutable field initializers across methods #393
Draft
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@alcides alcides alcides approved these changes

Uh oh!

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

Assignees

@rcosta358 rcosta358

Labels

bug Something isn't working

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

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

2 participants

@rcosta358 @alcides
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.