November 13, 2014 [Issue 13731] New: Wrong interpretation of const keyword when creating @property returning class | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=13731 Issue ID: 13731 Summary: Wrong interpretation of const keyword when creating @property returning class Product: D Version: D2 Hardware: x86_64 OS: Windows Status: NEW Severity: enhancement Priority: P1 Component: DMD Assignee: nobody@puremagic.com Reporter: buday48@mail.ru class Foo { } class Bar { Foo foo_; Foo foo() const @property { return this.foo_; //<- Compilation Error } } void main() { } DMD 2.066 gives an error message: app.d(10): Error: cannot implicitly convert expression (this.foo_) of type const(Foo) to app.Foo const keyword is actually used to specify function foo() but not its type Foo -- |
Copyright © 1999-2021 by the D Language Foundation