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 — False error: a state inside a @RefinementAlias body is not translated (Closed(_) rejects a closed object) · Issue #503 · liquid-java/liquidjava

False error: a state inside a @RefinementAlias body is not translated (Closed(_) rejects a closed object) #503

New issue
Copy link
New issue
Copy link
Closed
#507
Closed
False error: a state inside a @RefinementAlias body is not translated (Closed(_) rejects a closed object)#503
#507
Copy link
Labels
bugSomething isn't workingSomething isn't working

Description

@CatarinaGamboa
CatarinaGamboa
opened on Nov 9, 2026
Issue body actions

Problem. A state used inside a @RefinementAlias body is never translated to its state set. An alias over a state rejects objects that are in that state.

import liquidjava.specification.*;

@StateSet(name = "phase", value = {"closed", "opened"})
@RefinementAlias("Closed(AliasState x) { closed(x) }")
public class AliasState {
    @StateRefinement(to = "closed(this)")
    public AliasState() {}

    @StateRefinement(from = "closed(this)", to = "opened(this)")
    public void open() {}

    static void needsClosed(@Refinement("Closed(_)") AliasState a) {}

    public static void main(String[] args) {
        AliasState a = new AliasState();
        needsClosed(a);
        a.open();
        needsClosed(a); // should fail
    }
}

The first needsClosed(a), right after the constructor, is rejected:

Refinement Error: closed(a) is not a subtype of Closed(a)
  where Closed(x) = closed(x)

Cause. VCChecker translates states (changeStatesToRefinements) before it expands aliases (changeAliasToRefinement). A state that only appears once the alias is expanded stays an uninterpreted Boolean closed(a), unrelated to state1(a).

Fix. Expand aliases before translating states, on every path that does both.

Found while designing #502.

Activity

  1. CatarinaGamboa
    added
    bugSomething isn't workingSomething isn't working
    on Nov 9, 2026
  2. CatarinaGamboa
    added a commit that references this issue on Nov 9, 2026

    Expand aliases before translating states (#507)

    This issue will close once commit 53f8b1d is merged into the 'main' branch.
    53f8b1d
  3. CatarinaGamboa
    closed this as completedin #507on Nov 9, 2026
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

    bugSomething isn't workingSomething isn't working

    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.