Bug 11768 – inconsistent behavior of type qualifier inout + const

Status
NEW
Severity
major
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-12-18T20:00:45Z
Last change time
2024-12-13T18:15:17Z
Keywords
pull, wrong-code
Assigned to
No Owner
Creator
Kenji Hara
Moved to GitHub: dmd#18740 →

Comments

Comment #0 by k.hara.pg — 2013-12-18T20:00:45Z
Currently inout(const(T)) should become const(T). Test case: void test1(inout int = 0) { const(inout(char)) k1; inout(const(char)) k2; static assert(typeof(k1).stringof == "const(char)"); // OK static assert(typeof(k2).stringof == "const(char)"); // fails static assert(is(typeof(k1) == typeof(k2))); // fails }
Comment #1 by k.hara.pg — 2013-12-18T20:16:17Z
Comment #2 by github-bugzilla — 2013-12-21T12:56:11Z
Commit pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/09448ff6c3d1a273444983cf94f9b07ff70d112d fix Issue 11768 - inconsistent behavior of type qualifier inout + const Fix up `Parser::parseBasicType` by using `Type::addSTC`
Comment #3 by robert.schadek — 2024-12-13T18:15:17Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/18740 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB