Describe the bug
If an inner class is used as the target of @lombok.experimental.Delegate anywhere, instantiating that class using the outer.new Class() syntax emits a compile error.
To Reproduce
static class Foo {
class Bar {}
}
static class Delegating {
@lombok.experimental.Delegate
Foo.Bar b;
}
public static void main(String[] args) {
Foo foo = new Foo();
foo.new Bar(); // Compile error: No enclosing instance of type Foo is accessible
}
Expected behavior
No compile error in the code above
Version info (please complete the following information):
- Lombok 1.18.42
- Eclipse 2025-12 (4.38.0)
- Compiler target: 1.8