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 — Verify static and default interface method bodies by CatarinaGamboa · Pull Request #385 · liquid-java/liquidjava

Conversation

@CatarinaGamboa

@CatarinaGamboa CatarinaGamboa commented Oct 8, 2026

Copy link
Copy Markdown
Collaborator

Fixes #343.

The verifier assumed every return and this access belonged to a class, so static and default interface methods crashed before verification. Return checking now uses the nearest method and its declaring type, resolves overloads by parameter types, and keeps lambda returns separate from an enclosing method. Interface method invocations also use their registered contracts.

New passing cases cover the reported String.length() call, annotated static/default methods, return this, same-arity overloads, and lambda returns inside interface bodies. New failing cases require errors for invalid static/default returns and a bad interface method argument.

Validation: mvn test passed all 391 tests, and the four new fixtures produced their expected outcomes when run directly.

This change does not extend interface supertype contract inheritance.

Sorry, something went wrong.

Uh oh!

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

All reactions
@CatarinaGamboa
Check interface method bodies and calls without class-only assumptions
956d550
Fix issue #343 by resolving return contracts from the nearest method and its declaring type, including interface static and default methods. Use exact parameter types and keep lambda returns separate from enclosing methods. Add passing and failing interface regressions.
@CatarinaGamboa CatarinaGamboa mentioned this pull request Oct 8, 2026
Isolate deferred callback state from lambda creation #386
Merged
rcosta358
rcosta358 approved these changes Oct 9, 2026
View reviewed changes
@CatarinaGamboa
CatarinaGamboa merged commit 26ea1c8 into main Oct 13, 2026
1 check passed

Uh oh!

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

CatarinaGamboa added a commit that referenced this pull request Oct 13, 2026
@CatarinaGamboa
Isolate deferred callback state from lambda creation (#386)
9addae1
Creating a lambda currently applies its body's state transitions to
captured objects. For example, `Runnable later = () ->
manager.addEdit(null); manager.undo();` passes even though the callback
may never run. Check lambda bodies in an isolated context so their
assignments, branch facts, and try transitions do not change the
surrounding execution.

Forget invocation-time assumptions about mutable captures while
preserving guards on effectively final primitive captures. Restore
variable instances, shared refinements, paths, and enclosing try
recorders even after a body diagnostic. The regressions cover local and
field callbacks, nested lambdas, try/catch/finally, invalid bodies,
primitive guards, and the anonymous-class reproducer already fixed by
#326.

Callback invocation summaries remain unsupported: `listener.run()` does
not apply effects to its captures. Receiver-call checking and lambda
return boundaries are handled separately by #384 and #385.

Validation: `mvn test -pl liquidjava-verifier -am` (389 tests, no
failures) before the final blank-local capture precision adjustment.
Both focused fixtures were rerun on the final code: the passing fixture
verifies, including blank locals assigned before capture, and all seven
expected failing-fixture diagnostic titles and positions match.

Fixes #341.
@rcosta358
rcosta358 deleted the fix/343-interface-static branch October 13, 2026 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@rcosta358 rcosta358 rcosta358 approved these changes

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.

Verifier crashes on a method call inside a static method of an interface

Uh oh!

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

2 participants

@CatarinaGamboa @rcosta358
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 01402520 — 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.