[Issue 16215] Nested class unable to resolve outer class variables in certain scenarios
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue May 7 19:22:46 UTC 2019
https://issues.dlang.org/show_bug.cgi?id=16215
Alexander <ismailsiege at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ismailsiege at gmail.com
--- Comment #2 from Alexander <ismailsiege at gmail.com> ---
Analogous case that does not work in dmd 2.086.0, but works in 2.085.0:
class Base
{
class BaseInner {}
}
final class Derived: Base
{
bool someMethod() { return false; }
final class DerivedInner: BaseInner
{
void func()
{
pragma(msg, typeof(this.outer)); // prints "Derived"
someMethod();
}
}
}
void main() {}
compiler output:
Derived
onlineapp.d(17): Error: this for someMethod needs to be type Derived not type
onlineapp.Base
--
More information about the Digitalmars-d-bugs
mailing list