Bug 9199 – Module level qualified functions should be rejected

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-12-23T06:39:00Z
Last change time
2013-02-18T00:00:09Z
Keywords
accepts-invalid, pull
Assigned to
nobody
Creator
k.hara.pg

Comments

Comment #0 by k.hara.pg — 2012-12-23T06:39:18Z
Module level functions with qualifiers should report compile error, but doesn't. void fc() const {} void fi() immutable {} void fw() inout {} void fs() shared {} In above, fc and fi reports Error: function test.foo without 'this' cannot be const/immutable But fw and fs compiles with no error.
Comment #1 by k.hara.pg — 2012-12-23T07:53:24Z
Comment #2 by bearophile_hugs — 2012-12-23T08:16:21Z
Is this a first step toward fixing Issue 3934 ?
Comment #3 by k.hara.pg — 2012-12-23T08:27:16Z
(In reply to comment #2) > Is this a first step toward fixing Issue 3934 ? Mostly unrelated.
Comment #4 by github-bugzilla — 2013-01-21T17:49:31Z
Commits pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/122b3b8e2fae8692c6570f087629854c17120fe7 fix Issue 9199 - Module level qualified functions should be rejected `inout` had qualified the function itself, rather than its return type. https://github.com/D-Programming-Language/phobos/commit/27c81c985d80e15757d5ead12537944f40f6da04 Merge pull request #1087 from 9rnsr/fix9199 Supplemental fix for Issue 9199 - Module level qualified functions should be rejected
Comment #5 by github-bugzilla — 2013-02-17T23:38:40Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/9be3402e51ee4b1384e9d9320f15b1a4d2f25059 fix Issue 9199 - Module level qualified functions should be rejected https://github.com/D-Programming-Language/dmd/commit/a22a1254ce29272dc223a1566e2e6ad24d65cd1d Merge pull request #1400 from 9rnsr/fix9199 Issue 9199 - Module level qualified functions should be rejected