Bug 24109 – [REG2.103] 'need this' when invoking outer method from inner method
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2023-08-25T14:18:06Z
Last change time
2023-09-16T07:31:16Z
Keywords
pull
Assigned to
No Owner
Creator
kinke
Comments
Comment #0 by kinke — 2023-08-25T14:18:06Z
This doesn't compile anymore since D v2.103 (and still doesn't with v2.105.0):
```
struct Outer {
void method1() {}
void method2() {
class Inner {
void innerMethod() {
method1();
}
}
}
}
```
```
Error: need `this` for `method1` of type `void()`
```
Comment #1 by dlang-bot — 2023-09-05T14:10:36Z
@RazvanN7 created dlang/dmd pull request #15577 "Fix Issue 24109 - [REG2.103] 'need this' when invoking outer method from inner method" fixing this issue:
- Fix Issue 24109 - [REG2.103] 'need this' when invoking outer method from inner method
https://github.com/dlang/dmd/pull/15577
Comment #2 by dlang-bot — 2023-09-07T11:50:02Z
dlang/dmd pull request #15577 "Fix Issue 24109 - [REG2.103] 'need this' when invoking outer method from inner method" was merged into stable:
- 2faf01bf60f735da75019084413402f373135e19 by RazvanN7:
Fix Issue 24109 - [REG2.103] 'need this' when invoking outer method from inner method
https://github.com/dlang/dmd/pull/15577
Comment #3 by dlang-bot — 2023-09-16T07:31:16Z
dlang/dmd pull request #15609 "merge stable" was merged into master:
- a6c48b8a0bf15c1e1b8af3b1bd8f4cd169dfdca3 by Razvan Nitu:
Fix Issue 24109 - [REG2.103] 'need this' when invoking outer method from inner method (#15577)
https://github.com/dlang/dmd/pull/15609