liquid-java / liquid-java/liquidjava

This should not typecheck, but it typechecks

Open
#11 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Java
Stars
67
Forks
36
Avg merge
10d 18h
Merged PRs (30d)
3

Description

```
@Ghost("int some_other_ghost")
public class Test2 {
int n = 0;

@StateRefinement(from="some_other_ghost(this) > 0", to="some_other_ghost(this) < 0")
private void f(){}

private void shouldFail(){
f();
f();
}

public static void main(String[] args) {
Test2 t = new Test2();
t.shouldFail();
}
}
```

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Use the Java snippet in the issue as the reproduction case and run LiquidJava's type checker against it. Trace why the two calls to f() are accepted despite the stated state refinement, then verify that the checker rejects this example while preserving the intended refinement behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.