Skip to content

Assertions being decompiled as if (!<unrepresentable>.$assertionsDisabled && ...) #537

@DRayX

Description

@DRayX

Vineflower version

1.11.2

Describe the bug

Assert statements are being decompiled to code blocks like the following:

if (!<unrepresentable>.$assertionsDisabled && value == null) {
  throw new AssertionError();
} else {
  // some logic
  return value;
}

when clearly this should decompile to something like

assert(value != null);
// some logic
return value;

Additional information

This is inside a default method of an interface. This may have something to do with the intersection of static fields on interfaces with assertions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions