Skip to content

LambdaLift lifts methods that access private fields too far #514

@DarkDimius

Description

@DarkDimius

Contexts.Context.printCreationTraces has a lambda inside, that accesses a private accessor creationTrace of Contexts.Context.
LambdaLift lifts it out to a static method in Contexts, without setting a NotJavaPrivate on the private accessor of the creationTrace.

Manifests itself with such error:

Exception in thread "main" java.lang.VerifyError: Bad invokespecial instruction: current class isn't assignable to reference class.
Exception Details:
  Location:
    dotty/tools/dotc/core/Contexts$.$anonfun$printCreationTraces$2(Ldotty/tools/dotc/core/Contexts$$Context;)V @50: invokespecial
  Reason:
    Error exists in the bytecode

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions