October 20, 2021 [Issue 21807] Non-immutable data can be converted to immutable using function call in ctor | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=21807 Dlang Bot <dlang-bot@dlang.rocks> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull --- Comment #11 from Dlang Bot <dlang-bot@dlang.rocks> --- @RazvanN7 created dlang/dmd pull request #13206 "Fix Issue 21807 - Issue 21807 - Non-immutable data can be converted to immutable using function call in ctor" fixing this issue: - Fix Issue 21807 - Issue 21807 - Non-immutable data can be converted to immutable using function call in ctor https://github.com/dlang/dmd/pull/13206 -- |
August 09, 2022 [Issue 21807] Non-immutable data can be converted to immutable using function call in ctor | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=21807 Walter Bright <bugzilla@digitalmars.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |bugzilla@digitalmars.com Resolution|--- |INVALID --- Comment #12 from Walter Bright <bugzilla@digitalmars.com> --- With current master, and @safe applied, the following deprecation is printed with or without -preview=dip1000: test.d(8): Deprecation: slice of static array temporary returned by `bb()` assigned to longer lived variable `this.str` This message is correct. Note that since the char[12] is a temporary value, there are no other references to it, so it can safely be converted to immutable. Closing as the compiler is working as expected. -- |
Copyright © 1999-2021 by the D Language Foundation